View source: R/count_vars_sep.R
count_vars_sep | R Documentation |
Separate texts in a variables using a separator sep
into rows, trim white space,
counts each variables, and return list of counted data frames.
count_vars_sep(data, vars = NULL, sep = ",", convert = FALSE, sort = TRUE)
data |
A Data Frame |
vars |
(Character) A Character of variables to count. If |
sep |
A separator of texts |
convert |
If |
sort |
If |
a named list of data frames (named as counted variable names)
df <- data.frame(
x = 1:3,
y = c("a", "d,e,f", "g,h"),
z = c("1", "2, 3, 4", "5, 6, 7")
)
count_vars_sep(df, sep = ",")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.