gen_text | R Documentation |
This function use the data to generate label and bullet points for the box.
gen_text(x, label = NULL, bullet = FALSE)
x |
A list or a vector to be used. |
label |
A character string as a label at the beginning of the text label. The count for each categories will be returned if no label is provided. |
bullet |
If shows bullet points. If the value is 'TRUE', the bullet points will be tabulated, default is 'FALSE'. |
A character string of vector.
val <- data.frame(
am = factor(ifelse(mtcars$am == 1, "Automatic", "Manual"), ordered = TRUE),
vs = factor(ifelse(mtcars$vs == 1, "Straight", "V-shaped"), ordered = TRUE),
car = row.names(mtcars)
)
gen_text(val$car, label = "Cars in the data")
gen_text(val$car, label = "Cars in the data", bullet = FALSE)
gen_text(split(val$car, val$am), label = "Cars in the data")
gen_text(split(val$car, val$am), label = "Cars in the data", bullet = FALSE)
gen_text(split(val[,c("vs", "car")], val$am), label = "Cars in the data", bullet = FALSE)
gen_text(val[,c("vs", "car")], label = "Cars in the data", bullet = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.