/sampledblib.r

SampleDBLib

Primary LanguageRGNU General Public License v3.0GPL-3.0

sampledblib.r

sampledblib.r provides an R wrapper around the python package sampledblib

Installation

You can install the development version of sampledblib.r from GitHub with:

# install.packages("devtools")
devtools::install_github("m-murphy/sampledblib.r")

# optionally activate your virtual environment
reticulate::use_virtualenv("your_venv")

# install the python package
sampledblib.r::install_sampledblib()

Example

library(sampledblib.r)
library(reticulate)

# optionally activate your virtual environment
reticulate::use_virtualenv("your_venv")

# set your sql connection string
options("sampledblib.db.location" = "sqlite:///path_to_sqlite.sqlite")

# set your date format
options("sampledblib.fm.date_format" = "%d-%b-%Y")

# initialize your sampledb
initialize_sampledb()

# get all studies
studies <- get_studies()