binarize.factor | R Documentation |
Create binary dummy variables based on a factor variable. This function is used internally by binarize
.
binarize.factor(x, name, y, segments = 10, bin.size = 5)
x |
a numeric vector. |
name |
a character string, the variable name of |
y |
a numeric or integer vector of the same length as |
segments |
a positive integer indicating the maximum number of levels allowed in the factor variable. |
bin.size |
a positive integer. It is the minimum number of observations required to fall into each bin. |
a data frame with binary (0 and 1) entries. The column names are indicative of the conditions used to form the corresponding columns.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.