Learn R Programming

TrialEmulation (version 0.0.4.2)

read_expanded_data: 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 te_datastore_datatable read_expanded_data(object, period = NULL, subset_condition = NULL)

Value

A data.frame of class data.table.

Arguments

object

An object of class te_datastore.

period

An integerish vector of non-zero length to select trial period(s) or NULL (default) to select all files.

subset_condition

A string of length 1 or NULL (default).

Examples

Run this code
# 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)

Run the code above in your browser using DataLab