Gracefully handles differences in variable size and NAs, and allows easy removal of variables.
1 |
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. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.