From mcw@ln.nimh.nih.gov  Fri Feb 18 21:27:14 2000
From: mcw@ln.nimh.nih.gov (mcw@ln.nimh.nih.gov)
Date: Fri, 18 Feb 2000 22:27:14 +0100 (MET)
Subject: [Rd] splitstr documentation problem (PR#451)
Message-ID: <200002182127.WAA14595@pubhealth.ku.dk>


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

(Example)
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 problem is in the second example; the "\." should be "\\."  

Thanks for the great software.

Matt Wiener



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] splitstr documentation problem (PR#451)
mcw@ln.nimh.nih.gov