[R] decomposing a string representing a valid mathematical expression?

Witold E Wolski wewo|@k| @end|ng |rom gm@||@com
Tue Oct 29 13:55:27 CET 2019


Hello,

I would like to decompose a string i.e.

"a - b"
or "a +b"

into an array or list
["a","-","b"]

Since R knows how to parse expressions these type of expressions I
would like to reuse some existing functions and not to use gsub or
strsplit etc.

Thank you
Witek

-- 
Witold Eryk Wolski



More information about the R-help mailing list