Описание тега strsplit
NoneStrsplit is a function in R and MATLAB which splits the elements of a character vector around a given delimiter.
strsplit
is a function in R ( documentation) and MATLAB ( documentation), which splits the elements of a character vector into substrings:
# R:
strsplit(x, split, fixed=FALSE)
% MATLAB
strsplit(x, split);
Splits a character string or vector of character strings using a regular expression or a literal (fixed) string. The strsplit
function outputs a list (R) or cell array (MATLAB), where each list item corresponds to an element of x
that has been split.
x
a character string or vector of character strings to split.split
the character string to splitx
.
In R, ifsplit
is an empty string (""
), thenx
is split between every character.- [R only:]
fixed
if the split argument should be treated as fixed (i.e. literally). By default, the setting isFALSE
, which means that split is treated like a regular expression.