strip_label_part: A convenience function to help splitting prefixes and...

View source: R/notation.R

strip_label_partR Documentation

A convenience function to help splitting prefixes and suffixes

Description

This function should only ever see a single label (x) and a single notation.

Usage

strip_label_part(x, notation, part, pattern_pref = "", pattern_suff = "")

Arguments

x

The label(s) to be split.

notation

The notations to be used for each x.

part

The part of the label to work on, such as "pref_start", "pref_end", "suff_start", or "suff_end".

pattern_pref

The prefix to a regex pattern to be used in gsub().

pattern_suff

The suffix to a regex pattern to be used in gsub().

Details

If notation is NULL, x is returned, unmodified.

Value

A label shorn of the part to be stripped.


RCLabels documentation built on May 29, 2024, 5:56 a.m.