[R] about strsplit

Olivier Houix Olivier.Houix at ircam.fr
Thu May 10 11:04:49 CEST 2001


Hello,
I want to split a string including a "+" but 
it seems there is no effect because of this special character.
Just to explain, I convert frequencies to midi notes (external program)
but I don't want to keep 
information about quater-tone!
 
> s <- c("Fd4+1/4") (i't a note!)
> strsplit(s,"+")
[[1]]
[1] "F" "d" "4" "+" "1" "/" "4"

but
> strsplit(s,"d")
[[1]]
[1] "F"     "4+1/4"
So the problem is "+" !

I would prefer to obtain:
"Fd4" "1/4"

Thanks

Olivier Houix
-- 
Olivier Houix  <houix at ircam.fr>             tel: 01 44 78 15 51
Equipe Perception et Cognition Musicales    http://www.ircam.fr/  
IRCAM   1 place Igor Stravinsky             75004         Paris
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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