[R] strsplit with invalid regular expression

Bharat Warule bwarule at gmail.com
Thu Nov 8 12:39:33 CET 2012


Hi all,

> diff_operator <- "\\("
> strsplit(cond, diff_operator)
[[1]]
[1] "andsin"         "log_angle_1_4)"

> diff_operator <- "\\sin("
> strsplit(cond, diff_operator)
Error in strsplit(cond, diff_operator) : 
  invalid regular expression '\sin(', reason 'Missing ')''

When I am going to split with "(" it’s working fine but when i want use
"sin(" this is not working.
I understand that, I am missing something can anybody please point me.
Thanks for your help.

Thanks,
Bharat



-----
Bharat Warule 
Pune
--
View this message in context: http://r.789695.n4.nabble.com/strsplit-with-invalid-regular-expression-tp4648857.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list