# NOT RUN {
## Example that uses RData format to efficiently
## download and load tables, as an alternative
## to using this function.
# }
# NOT RUN {
d <- tempdir()
download_studentlife(location = d, url = "rdata")
# Choose the schema and table from the list SL_tables:
SL_tables
# Example with activity table from sensing schema
schema <- "sensing"
table <- "activity"
act <- readRDS(paste0(d, "/dataset_rds/", schema, "/", table, ".Rds"))
act
# }
# NOT RUN {
## Example that uses the studentlife dataset in
## its original format.
# Use url = "dartmouth" for the full original dataset
d <- tempdir()
download_studentlife(location = d, url = "testdata")
# }
# NOT RUN {
## With menu
load_SL_tibble(location = d)
# }
# NOT RUN {
## Without menu
SL_tables
PAM <- load_SL_tibble(schema = "EMA", table = "PAM", location = d)
## Load less data for testing with less overhead
act <- load_SL_tibble(schema = "sensing", table = "activity",
location = d, csv_nrows = 10)
# }
# NOT RUN {
## Browse all tables with timestamps (non-interval)
load_SL_tibble(location = d, time_options = "timestamp")
## Browse all tables with intervals
load_SL_tibble(location = d, time_options = "interval")
## Browse all dateless tables
load_SL_tibble(location = d, time_options = "dateless")
# }
Run the code above in your browser using DataLab