read_expanded_data: Method to read expanded data

read_expanded_dataR 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 NULL (default) to select all files.

subset_condition

A string of length 1 or NULL (default).

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)

CAM-Roche/RandomisedTrialsEmulation documentation built on April 14, 2025, 7:44 a.m.