str_remove_from_var_labels: Update variable labels - remove a string from all variable...

View source: R/labelled.R

str_remove_from_var_labelsR Documentation

Update variable labels - remove a string from all variable labels

Description

Update variable labels - remove a string from all variable labels

Usage

str_remove_from_var_labels(df, pattern = "\\s\\(f[:digit:]+.*\\)$")

Arguments

df

A data frame

pattern

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

Value

A data frame

See Also

Other Labelled data utility functions: capitalise_first_letter_var_labels(), str_replace_all_var_labels()


rmgpanw/rawutil documentation built on May 20, 2022, 1:29 a.m.