connectToDatabase: Connect to a remote postgresql database

Description Usage Arguments Value Note Source

View source: R/DatabaseInteractionFunctions.R

Description

Use the RPostgres package to connect to a remote postgresql database

Usage

1
2
3
4
5
6
connectToDatabase(
  database_host,
  database_name,
  database_user,
  database_password
)

Arguments

database_host

if connecting to a database hosted on AWS, it might be something like ec2-54-83-201-96.compute-1.amazonaws.com

database_name

name of the database, eg for cryptococcus kn99, the database might be named kn99_database. Check with the documentation, whoever set up the database, or get into the server and check directly

database_user

a user of the actual database, with some level of permissions. You'll need to check with the database maintainer for this. It is suggested that you use a .Renviron file in your local project (make sure it is completely ignored by git, R, etc) to store this info

database_password

password to the database user. You'll need to check with the database maintainer for this. It is suggested that you use a .Renviron file in your local project (make sure it is completely ignored by git, R, etc) to store this info

Value

A DBI connection to the remote database

Note

for information on using R environmental files, see https://support.rstudio.com/hc/en-us/articles/360047157094-Managing-R-with-Rprofile-Renviron-Rprofile-site-Renviron-site-rsession-conf-and-repos-conf

Source

https://rpostgres.r-dbi.org/


cmatKhan/brentlabRnaSeqTools documentation built on Nov. 17, 2021, 5:47 a.m.