Answers for "string split '\r\n'"

R
0

line split r

noquote(strsplit("A text I want to display with spaces", NULL)[[1]])

x <- c("asfef", "qwerty", "yuiop[", "b", "stuff.blah.yech")
# split x on the letter e
strsplit(x,"e")

unlist(strsplit("a.b.c", "."))
## [1] "" "" "" "" ""
## Note that `split' is a regexp!
## If you really want to split on `.', use
unlist(strsplit("a.b.c", "\."))
## [1] "a" "b" "c"
Posted by: Guest on May-23-2021
-1

r string split

str_split(string, pattern, n = Inf, simplify = FALSE)

str_split_fixed(string, pattern, n)

str_split_n(string, pattern, n)
Posted by: Guest on April-12-2021

Browse Popular Code Answers by Language