read_expanded_data {TrialEmulation} | R Documentation |
Method to read expanded data
Description
This method is used on te_datastore objects to read selected data and return one data.table
.
Usage
read_expanded_data(object, period = NULL, subset_condition = NULL)
## S4 method for signature 'te_datastore_datatable'
read_expanded_data(object, period = NULL, subset_condition = NULL)
Arguments
object |
An object of class te_datastore. |
period |
An integerish vector of non-zero length to select trial period(s) or |
subset_condition |
A string of length 1 or |
Value
A data.frame
of class data.table
.
Examples
# create a te_datastore_csv object and save some data
temp_dir <- tempfile("csv_dir_")
dir.create(temp_dir)
datastore <- save_to_csv(temp_dir)
data(vignette_switch_data)
expanded_csv_data <- save_expanded_data(datastore, vignette_switch_data[1:200, ])
# read expanded data
read_expanded_data(expanded_csv_data)
# delete after use
unlink(temp_dir, recursive = TRUE)
[Package TrialEmulation version 0.0.4.0 Index]