label_output: Label Output

View source: R/label_standardize.R

label_outputR Documentation

Label Output

Description

Wrapper for label_standardize and label_html, to create labels for a leaflet map in one step. Object p assigned within label_output function to enable easier line breaks in glue function.

Usage

label_output(df, label_text)

Arguments

df

Dataframe to create labels from

label_text

Text fed to glue function to create labels using columns in dataframe. For the glue function, an object p is defined to be "<p></p>" for easier line breaks

Value

List of strings corresponding to length of dataframe, supplied to leaflet function

Examples

labs <- "Ward name: {WARD} Area: {Area}"

map <- leaflet::leaflet(leafletwrappers::wards)
leaflet::addPolygons(map, label = label_output(leafletwrappers::wards, labs))

dpowerstp/leafletwrappers documentation built on Sept. 4, 2022, 10:19 a.m.