[R] decomposing a string representing a valid mathematical expression?
Bert Gunter
bgunter@4567 @end|ng |rom gm@||@com
Tue Oct 29 15:37:50 CET 2019
Not sure what you're looking for, but see ?deparse for deparsing
**expressions.**
-- Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Tue, Oct 29, 2019 at 5:56 AM Witold E Wolski <wewolski using gmail.com> wrote:
> 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
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
[[alternative HTML version deleted]]
More information about the R-help
mailing list