Skip to contents

Reads .xpt, .sas7bdat, Dataset-JSON (.json) and .parquet files into a named list that can go straight into sideview() or sideview_widget(). Names are the lower-case file stems, in file order. Variable labels are kept.

Usage

sv_read_cdisc(path, lazy = TRUE)

Arguments

path

A directory (its supported files are read, not recursively) or a character vector of files. A file with an unsupported extension is an error when named, and ignored when found in a directory. A file whose package is not installed is an error when named, and skipped with one warning when found in a directory.

lazy

When TRUE (the default), parquet files are opened as Arrow Datasets and stay on disk. When FALSE they are read into data frames.

Value

A named list of data frames (and Arrow Datasets for lazy parquet). A file that cannot be read gives a warning and is skipped.

Details

Each format needs its package, all in Suggests:: haven (.xpt, .sas7bdat), datasetjson (.json) and arrow (.parquet). Files are only read, never run. Nothing goes over the network.

Examples

if (FALSE) { # \dontrun{
x <- sv_read_cdisc("study/sdtm")
sideview_widget(x)
} # }