strsplit.select: Splits tekst en selecteer element

Description Usage Arguments See Also Examples

Description

Splits tekst en selecteer element

Usage

1
2
strsplit.select(x, element, split = " ", fixed = FALSE, perl = FALSE,
  useBytes = FALSE)

Arguments

x

character vector, each element of which is to be split. Other inputs, including a factor, will give an error.

element

The nth element that should be returned.

split

character vector (or object which can be coerced to such) containing regular expression(s) (unless fixed = TRUE) to use for splitting. If empty matches occur, in particular if split has length 0, x is split into single characters. If split has length greater than 1, it is re-cycled along x.

fixed

logical. If TRUE match split exactly, otherwise use regular expressions. Has priority over perl.

perl

logical. Should Perl-compatible regexps be used?

useBytes

logical. If TRUE the matching is done byte-by-byte rather than character-by-character, and inputs with marked encodings are not converted. This is forced (with a warning) if any input is found which is marked as "bytes" (see Encoding).

See Also

strsplit

Examples

1
2
3
4
5
6
## Not run: 
tbl %>%
  mutate(genus = strsplit.select(microorganisme, 1),
         species = strsplit.select(microorganisme, 2))

## End(Not run)

msberends/certedata documentation built on Nov. 26, 2019, 5:19 a.m.