extract_differences_between_characters: Identify shared leading or trailing character strings

Description Usage Arguments Value Author(s) Examples

View source: R/extract_differences_between_characters.R

Description

For a vector of character strings, identify elements between shared leading and/or trailing substrings, e.g. for a vector such as c("XXX01YYY",XXX02YYY") extract the numbers.

Usage

1

Arguments

strings

vector of character strings for elements to be extracted from.

Value

vector of strings similar to the input vector but without shared leading and trailing characters.

Author(s)

Eike Luedeling

Examples

1
2
3
4
  extract_differences_between_characters(c("Temp_01","Temp_02","Temp_03"))
  extract_differences_between_characters(c("Temp_01_Tmin","Temp_02_Tmin","Temp_03_Tmin"))
  extract_differences_between_characters(c("a","b"))                                           
 

chillR documentation built on Jan. 11, 2022, 5:07 p.m.