Connecting R

Connecting R

To connect to your Panoply data warehouse to R:

  1. Install the RPostgreSQL package. You can do this in your R environment by running the following:

     install.packages("RPostgreSQL")
     library(RPostgreSQL)
    
  1. Set up the connection to your Panoply data warehouse:

     driver <- dbDriver("PostgreSQL")
     SampleConnection <- dbConnect(driver,
     host = 'db.panoply.io',
     port = '5439',
     user = '{your Panoply username}',
     password = '{your Panoply password}',
     dbname = '{the name of the Panoply DB containing your data}')
    
  1. Load your data into an R dataframe for analysis:

    SampleDF = dbReadTable(SampleConnection, '{table name}')

Getting started is easy! Get all your data in one place in minutes.
Try Free