View source: R/transformation_functions.R
| norm2ordinal | R Documentation | 
Transforms a vector with a normal distribution to a binomial distribution with two values.
norm2ordinal(x, k)
| x | Input vector | 
| k | Number of discrete values (e.g., 2=binary, 5=likert scale) | 
A ordinal or binary variable
norm2ordinal(x = rnorm(n = 100,mean = 0,sd = 1),k=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.