R/labelled.R
str_remove_from_var_labels.Rd
Update variable labels - remove a string from all variable labels
str_remove_from_var_labels(df, pattern = "\\s\\(f[:digit:]+.*\\)$")
A data frame
Pattern to look for.
The default interpretation is a regular expression, as described
in stringi::stringi-search-regex. Control options with
regex()
.
Match a fixed string (i.e. by comparing only bytes), using
fixed()
. This is fast, but approximate. Generally,
for matching human text, you'll want coll()
which
respects character matching rules for the specified locale.
Match character, word, line and sentence boundaries with
boundary()
. An empty pattern, "", is equivalent to
boundary("character")
.
A data frame
Other Labelled data utility functions:
capitalise_first_letter_var_labels()
,
str_replace_all_var_labels()