splitMarker: Split concatenated strings.

Description Usage Arguments Value See Also

View source: R/erp_preprocess.R

Description

splitMarker is a conveniance function wrapping strsplit. It returns a data.frame with columns of customizable classes. Useful for post-processing markers.

Usage

1
splitMarker(marker, header, type = NULL, splitchar = "_")

Arguments

marker

a vector which contains concatenated elements

header

a character vector which determines the column names of the resulting data.frame

type

a character vector which determines the class of each column in the resulting vector. If its length is less then the number of columns, it will be recycled. If set to NULL (default), character vectors are transformed to factors.

splitchar

a character vector of length one indicating the splitting character (default: _). Splitting characters which are special characters in R (e.g. "|", ".", etc.) should be given as in strsplit (e.g. "\\|")

Value

A data.frame with header and appropriate classes, containing the spltted substrings of the original vector elements

See Also

strsplit


tdeenes/eegR documentation built on April 19, 2021, 4:17 p.m.