«

Using R

R is a statistical computing environment that is commonly used for data analysis, visualization, and model development. You can access Datomic from R using the RPresto library.

Installing

  1. Install R from the R CRAN site.
  2. Install RStudio following the instructions from the RStudio Download Page.
  3. Launch RStudio and install the RPresto package

by running the command below in the R console:

install.packages('RPresto')

Using RStudio:

To connect to Datomic Analytics, follow the configuration shown below and replace the appropriate values for user, host, port, schema, and catalog:

library('DBI')

con <- dbConnect(
  RPresto::Presto(),
  host='http://<host>',
  port=<port>,
  user='<user>',
  schema='<schema>',
  catalog='<catalog>'
)

res <- dbSendQuery(con, 'SELECT * FROM system.runtime.nodes;')
df <- dbFetch(res, -1)