clinical.import: Import multiple files exported from SAS

Description Usage Arguments Details Author(s) Examples

View source: R/clinical.R

Description

Provides a convenience function to build a list of data frames, where each data frame is generated by reading a .txt file assumed to have been generated by SAS proc export.

Usage

1
2
3
4
clinical.import(d, pattern = "^[a-zA-Z][a-zA-Z1-9]*\\.txt",
                usubjid = getOption("gtx.usubjid", "USUBJID"),
                verbose = TRUE, convert.YN = TRUE, 
                only)

Arguments

d

Path to directory containing files exported from SAS

pattern

Regular expression for files to be imported

usubjid

Name of variable used for unique subject identifier

verbose

Whether to print progress messages

convert.YN

Whether to convert columns of Y and N to logical type

only

Character vector

Details

Read the code or see the examples.

The variables named usubjid is imported as class character, all other character variables are imported as factors.

Author(s)

Toby Johnson Toby.x.Johnson@gsk.com

Examples

1
2
3
4
5
6
7
## Not run: 
clindata <- clinical.import("path/to/clinical/export/")
data(derivations.standard)
gxvars <- clinical.derive(clindata, derivations.standard)
summary(gxvars)

## End(Not run)

chuangaocornell/gtx2 documentation built on May 29, 2019, 2:12 p.m.