columns_to_labels: Create Text Labels from Data Frame Columns

View source: R/utils.R

columns_to_labelsR Documentation

Create Text Labels from Data Frame Columns

Description

Create Text Labels from Data Frame Columns

Usage

columns_to_labels(data, columns, fmt = "%s: %s", sep = ", ")

Arguments

data

data frame

columns

names of columns from which to create labels

fmt

format string passed to sprintf

sep

separator (default: ", ")

Value

vector of character with as many elements as there are rows in data

Examples

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 = "")

KWB-R/wasserportal documentation built on June 6, 2024, 10:26 a.m.