as.character
,
otherwise an error is generated.When a logical, numeric or integer vector argument is expected,
factors are converted with as.*(as.character(...))
,
and other coercible vectors are converted with as.*
,
otherwise an error is generated.
We of course took great care of performance issues: e.g. in regular expression searching, regex matchers are reused from iteration to iteration, as long it is possible.
Functions with some non-vectorized arguments are rare: e.g. regular expression matcher's settings are established once per each call.
Some functions
assume that a vector with one element is given
as an argument (like collapse
in stri_join
).
In such cases, if an empty vector is given you will get an error
and for vectors with more than 1 elements - a warning will be
generator (only the first element will be used).
You may find details on vectorization behavior in the man pages on each particular function of your interest.
NA
.names
, dim
, etc.).
This is generally because
of advanced vectorization and for efficiency reasons.
Thus, if arguments' preserving is needed,
please remember to copy important attributes manually
or use e.g. the subsetting operation like x[] <- stri_...(x, ...)
.stringi-encoding
;
stringi-locale
;
stringi-search-boundaries
;
stringi-search-charclass
;
stringi-search-coll
;
stringi-search-fixed
;
stringi-search-regex
;
stringi-search
; stringi
,
stringi-package