TrimSplit: Trim Split

Description Usage Arguments Details Examples

View source: R/basic_functions.R

Description

Extends strsplit by trimming and unlisting string

Usage

1
2
3
4
5
6
7
8
TrimSplit(
  x,
  sep = ",",
  fixed = FALSE,
  perl = FALSE,
  useBytes = FALSE,
  rm.empty = TRUE
)

Arguments

x

string

sep

symbol to separate data (e.g., comma-delimited), Default: ','

fixed

logical, if TRUE match split exactly, otherwise use regular expressions. Has priority over perl, Default: FALSE

perl

logical, indicating whether or not to use Perl-compatible regexps, Default: FALSE

useBytes

logical, if TRUE the matching is done byte-by-byte rather than character-by-character, Default: FALSE

rm.empty

logical. indicating whether or not to remove empty elements, Default: TRUE

Details

strsplit

Examples

1
2
 TrimSplit("Data 1,     Data2, Data3")
 # [1] "Data 1" "Data2"  "Data3"

oeysan/bfw documentation built on Jan. 18, 2021, 2:50 a.m.