You can connect and directly query your data via SQL using R. Here we are using R within the Rstudio IDE, but the same steps will work within a standard R session or Revo R.

Firstly you will need to install the RPostgreSQL package.

Once the package is installed we can activate it and establish a connection to the deltaDNA database:

You can also connect over SSL:

It is recommended that you connect from R using SSL as from March of 2018 we will no longer be accepting unencrypted connections to Direct Access.

Setting the SSL mode to require ensures that an SSL connection is used however there are other options you can configure the connection with – these can be found in 31.17.3 of the PostgreSQL SSL Support documentation.

Where you the user, password are the username and password you use to login to, and dbname is your company name and game name as shown in the address bar of your browser on the e.g.  NB there should be a full stop between the account name and the game name.

You can then write queries as R strings and pass them to the database, they will be returned as R data frames