columns_to_labels | R Documentation |
Create Text Labels from Data Frame Columns
columns_to_labels(data, columns, fmt = "%s: %s", sep = ", ")
data |
data frame |
columns |
names of columns from which to create labels |
fmt |
format string passed to |
sep |
separator (default: ", ") |
vector of character with as many elements as there are rows in data
data <- data.frame(number = 1:2, name = c("adam", "eva"), value = 3:4)
columns <- c("name", "value")
columns_to_labels(data, columns)
columns_to_labels(data, columns, fmt = "<p>%s: %s</p>", sep = "")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.