crtlibn: Load in CCS datasets

Description Usage Arguments Details Value Author(s) Examples

View source: R/crtlibn.R

Description

Designed to have similar functionality to %crtlibn() in SAS

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
crtlibn(
  d,
  dir = "analysis",
  env = "prod",
  prefix = "",
  fmts = FALSE,
  envir = parent.frame(),
  alt = FALSE,
  studpath = "",
  ...
)

Arguments

d

The study number

dir

The datasets you want to load (i.e. analysis, rave, stats, tst, uat, etc.). The default is analysis. Other directories are case specific.

env

Environment the data is located in. Current data is located in "prod", pre-PLM data located in "pre_plm"

prefix

A character string specifying a prefix for the dataset names. The default is no prefix

fmts

A data.frame specifying the formats specification, or a file path to such a file. Passing NULL (the default) doesn't give formats. If dir="rave" and fmts=TRUE, loads the formats for the RAVE datasets

envir

An environment in which to put the datasets. By default, the calling environment (e.g., globalenv())

alt

If TRUE allows for entering of a different study path than default. The default is FALSE

studpath

If alt=TRUE, use to specify where the SAS datasets are located

...

Other arguments passed to read.all()

Details

The function loads all of the datasets from where %crtlibn() does into your global directory.

The function can load the analysis, rave, or stats datasets. Simply include dir = "..." to the function call.

You can specify the prefix for the dataset to allow, for example, loading both analysis and rave datasets simultaneously without overwriting any datasets.

Added functionality to load RadOnc Studies by using the RAO number. Formats work as well.

Value

This function returns the names of the datasets invisibly

Author(s)

Sawyer Jacobson

Ethan Heinzen

Stephanie Duong

Examples

1
2
3
4
5
6
7
crtlibn(d = "A041703", dir = "rave", prefix = "rave.") # loads rave data without formats

crtlibn(d = "A041703") # loads the analysis files

#crtlibn(d = 'AFT-38') # Specific permissions necessary

crtlibn(d = "RAO1802", dir = "rave", fmts=TRUE) # loads Rave data with formats

sjacobson94/clinicaltrials documentation built on Oct. 27, 2020, 6:43 p.m.