loadSASdf: Load SAS datasets

Description Usage Arguments Value

View source: R/QCMemo_script.R

Description

The loadSASdf function reads in the Step 1 and Step 2 files specified in the doc block and automatically assigns them names (unless names are user-specified).

Usage

1
2
3
4
5
6
7
8
9
loadSASdf(
  rootdir,
  dirabb = "SD7",
  suffix = "",
  s1dat,
  s1names = NULL,
  s2dat,
  s2names = NULL
)

Arguments

rootdir

The root directory for all programs and data. This directory should contain subfolders for programs and SAS datasets (e.g. "prg" and "sd7" folders).

dirabb

The name of the directory (within the root directory) where the SAS datasets are stored.

suffix

A suffix to add to the end of all the filenames (before the file extension). For example, if the doc block lists the uncompressed datasets and you would like to add "_uncomp" to all the filenames, setting suffix = "_uncomp" would change "MyData.sas7bdat" to "MyData_uncomp.sas7bdat".

s1dat

A vector containing the names of all the Step 1 datasets. Must end in .sas7bdat and be uncompressed.

s1names

A vector of names for the Step 1 datasets. Must be the same length as s1dat

s2dat

The name of the Step 2 dataset. Must end in .sas7bdat and be uncompressed.

s2names

A vector of names for the Step 2 datasets. Must be the same length as s2dat

Value

A named list containing all the Step 1 and Step 2 datasets.


c-hill-mdrc/QCmemo documentation built on July 25, 2020, 12:48 a.m.