Description Types of functions Abbreviations
quest
is a package for pre-processing questionnaire data
to get it ready for statistical modeling. It contains functions for
investigating missing data (e.g., rowNA
), reshaping data (e.g.,
wide2long
), validating responses (e.g., revalids
), recoding
variables (e.g., recodes
), scoring (e.g., scores
), centering
(e.g., centers
), aggregating (e.g., aggs
), shifting (e.g.,
shifts
), etc. Functions whose first phrases end with an s
are
vectorized versions of their functions without an s
at the end of
the first phrase. For example, center
inputs a (atomic) vector and
outputs a atomic vector to center and/or scale a single variable;
centers
inputs a data.frame and outputs a data.frame to center
and/or scale multiple variables. Functions that end in _by
are
calculated by group. For example, center
does grand-mean centering
while center_by
does group-mean centering. Putting the two together,
centers_by
inputs a data.frame and outputs a data.frame to center
and/or scale multiple variables by group. Functions that end in _if
are calculated dependent on the frequency of observed values (aka amount of
missing data). The quest
package uses the str2str
package
internally to convert R objects from one structure to another. See
str2str
for details.
There are two main types of functions. 1) Helper
functions that primarily exist to save a few lines of code and are
primarily for convenience (e.g., vecNA
). 2) Functions for wrangling
questionnaire data (e.g., nom2dum
, reverses
).
See the table below
names
observed values
missing values
proportion
separator
variable
group
identifier
return
function
data.frame
factor
nominal variable
dummy variable
percentage of maximum possible
standardize
within-groups
between-groups
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.