Description Usage Arguments Value Examples
View source: R/utility_functions.R
A function to take a discrete variable and generate a new variable with the same number of levels whose values increase in unit increments. This is useful, for instance, if you have a variable encoding irregular subject ID numbers that you would like to use for indexing purposes.
1 |
x |
a vector of values. |
Returns a vector of matching length to x
with
incremental unit intervals corresponding to each level of the
original variable.
1 2 | x = c( 2320, 1038, 3010, 7503 )
print( createIncrement(x) )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.