change.cat | R Documentation |
Change values in a categorical vector to a lower or higher value
change.cat(num, rank.col, i, new.all.dat, n.change)
num |
the number of categories above you want to steal from if you are giving and not stealing, you always give to the category directly above and num=1 |
rank.col |
the colum in which the rankings will be |
i |
the interation you are up to in the while/for loop |
new.all.dat |
the data you are working on and want modified |
n.change |
the number of observations that need moving into or out of each category to get the requested proportions |
the categorical vector after modified
This function is called by the function modifyProps
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.