*will work for any JDBC db*
First you will need to install the RJDBC library. I did this using the R package manager (remember to include all dependencies).
The following lines connect to my local lucid instance, select the number of users from my pretend visitors table and stores the result in the ‘result’ variable.
library(RJDBC) driver <- JDBC("org.luciddb.jdbc.LucidDbClientDriver", "/Users/dan/Desktop/LucidDbClient.jar", identifier.quote="'") conn <- dbConnect(driver, "jdbc:luciddb:http://localhost:8034", "sa", "") result <- dbGetQuery(conn, "select count(*) from visitors") dbDisconnect(conn)
Remember, be a good person and close your connection :)
You can find out more from about RJDBC here http://cran.r-project.org/web/packages/RJDBC/index.html