stattest: Runs a particular statistical test over a melted data frame.

Description Usage Arguments

Description

Gracefully handles differences in variable size and NAs, and allows easy removal of variables.

Usage

1
stattest(var, by_var, test, ignore = NULL, data = get_data())

Arguments

var

character. The name of the first variable in the chi-square test.

by_var

charager. The name of the second (by) variable in the chi-square test.

test

character. Name of the test to run.

ignore

vector. A vector of the names of values to be replaced by NAs within both the var and the by_var. Can clean up categories that are too small for meaningful analysis.

data.

The data to be transformed. This is assumed to be a three column melted dataframe, using reshape2 <http://cran.r-project.org/web/packages/reshape2/index.html>. The first column should contain IDs, the second column should contain variable names, and the third column should contain variable values.


peterhurford/surveytools documentation built on May 25, 2019, 1:51 a.m.