format_resp: Formats a data.frame to have the same variables (column...

Description Usage Arguments Value

Description

Drops columns in the target data.frame (resp) not in the variable name list (items). Adds columns (with NA entries) for entries in the items that are not alrady in resp. This is mainly to simplify using item parameters obtained from one sample (e.g., calibration sample) with a second sample that may not use all of the items.

Usage

1
format_resp(resp, items, version = NULL)

Arguments

resp

the target data.frame to be re-formatted.

version

an optional string used to subset resp via grep(version, names(resp))

item

string vector of variable names.

Value

a data.frame that results from padding and deleting resp as described.


peterhalpin/BearShare documentation built on May 25, 2019, 12:48 a.m.