View source: R/variable_creation_functions.R
| draw_likert | R Documentation | 
Recode a latent variable into a Likert response variable
draw_likert(
  x,
  min = NULL,
  max = NULL,
  bins = NULL,
  breaks = NULL,
  labels = NULL
)
| x | a numeric variable considered to be "latent" | 
| min | the minimum value of the latent variable | 
| max | the maximum value of the latent variable | 
| bins | the number of Likert scale values. The latent variable will be cut into equally sized bins as in seq(min, max, length.out = bins + 1) | 
| breaks | A vector of breaks. This option is useful for settings in which equally-sized breaks are inappropriate | 
| labels | An optional vector of labels. If labels are provided, the resulting output will be a factor. | 
x <- 1:100
draw_likert(x, min = 0, max = 100, bins = 7)
draw_likert(x, breaks = c(-1, 10, 100))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.