change.cat: Change values in a categorical vector to a lower or higher...

View source: R/modifyProps.r

change.catR Documentation

Change values in a categorical vector to a lower or higher value

Description

Change values in a categorical vector to a lower or higher value

Usage

change.cat(num, rank.col, i, new.all.dat, n.change)

Arguments

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

Value

the categorical vector after modified

See Also

This function is called by the function modifyProps


kcha193/simarioV2 documentation built on April 8, 2024, 4:51 p.m.