# Create new label data set
labels <- add_label_image(region = "A",
year = -50,
position = 0.5,
image_path = "https://www.r-project.org/logo/Rlogo.png",
new = TRUE)
# Add labels to existing data set
labels <- add_label_image(data = labels,
region = "B",
year = 50,
position = 0.9,
image_path = "https://www.r-project.org/logo/Rlogo.png",
new = FALSE)
# They can be linked using the pipe operator \code{%>%}:
library(magrittr)
labels <- add_label_image(region = "A",
year = -50,
position = 0.5,
image_path = "https://www.r-project.org/logo/Rlogo.png",
new = TRUE) %>%
add_label_image(region = "B",
year = 50,
position = 0.9,
image_path = "https://www.r-project.org/logo/Rlogo.png")
Run the code above in your browser using DataLab