Created
August 12, 2018 19:32
-
-
Save javieroot/b20ca0ce5f5fc673191e54184de72ffc to your computer and use it in GitHub Desktop.
Conexión a base de datos de PostgreSQL desde R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Una vez teniendo lista la instalación de PostgreSQL y R: | |
# En el terminal: | |
pacman -S postgresql-libs | |
# Dentro de R instalar el paquete RPostgreSQL | |
install.packages("RPostgreSQL") | |
# Una vez realizado lo anterior se procede a realizar la conexión con: | |
library(RPostgreSQL) | |
con <- dbConnect(PostgreSQL(), dbname = "dsl", | |
host = "localhost/ip_servidor", port = 5432, | |
user = "usuario", password = "password") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment