labs <- assign_labels(
iris,
Sepal.Length = "cms",
Sepal.Width = "cms",
Petal.Length = "cms",
Petal.Width = "cms",
Species = "Iris ..."
)
labs$dummy <- ""
get_labels(labs) # shows label as for dummy column
labs0 <- remove_labels(labs, c("Sepal.Length", "Sepal.Width"))
get_labels(labs0) # No labels for Sepal.Length and Sepal.Width
Run the code above in your browser using DataLab