Skip to contents

Connect to AACT PostgreSQL database

Usage

aact_connection(user, password)

Arguments

user

Database username

password

Database password

Value

A connection object to the AACT database

Examples

# \donttest{
# Set environment variables for database credentials in .Renviron and load it
# readRenviron(".Renviron")

# Connect to the database
con <- aact_connection(Sys.getenv('user'), Sys.getenv('password'))
#> Error in postgresqlNewConnection(drv, ...): RPosgreSQL error: could not connect runner@aact-db.ctti-clinicaltrials.org:5432 on dbname "aact": connection to server at "aact-db.ctti-clinicaltrials.org" (174.138.61.222), port 5432 failed: fe_sendauth: no password supplied
# }