View source: R/add_N_to_catVar.R
add_N_to_catVar | R Documentation |
Add sample size to the value
add_N_to_catVar(x)
x |
A vector, of any type |
A factor
with the label and how many times that label appeared in x
data(mtcars) mtcars$cyl_n <- add_N_to_catVar(mtcars$cyl) # you can also pipe it with tidyverse mtcars %>% mutate(cyl_n = add_N_to_catVar(cyl))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.