serialzeStudyData {RImmPort} | R Documentation |
Load specific studies from the database and save it in .rds format in a local file directory
serialzeStudyData(study_ids, data_dir)
study_ids |
List of study indentifiers |
data_dir |
Path to a file folder where the .rds study files will be saved into |
List of study indentifiers that were serialized successfully
library(DBI) library(sqldf) studies_dir <- system.file("extdata", "ImmPortStudies", package = "RImmPort") db_dir <- file.path(studies_dir, "Db") sqlite_conn <- dbConnect(SQLite(), dbname=file.path(db_dir, "ImmPort.sqlite")) setImmPortDataSource(sqlite_conn) # the folder where the .rds files will be stored rds_dir <- file.path(studies_dir, "Rds") study_ids <- c('SDY139', 'SDY208') serialzeStudyData(study_ids, rds_dir)