Home

Published

- 1 min read

line split r

img of line split r

The solution for this is noted below

line split r

Solution

   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"

Try other methods by searching on the site. That is if this doesn’t work