[R] splitstr problem

Matthew Wiener mcw at ln.nimh.nih.gov
Fri Feb 18 20:32:54 CET 2000

Hi, all.

Using the patched version of R-0.99.0, I cannot reproduce the following
example from the strsplit  documentation:

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"

The first one gets the stated result, but the second gets me the same
result as the first.

Is there some way to do what's intended?


r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list