[R] formula argument evaluation
dusa.adrian at unibuc.ro
Wed Apr 13 08:59:04 CEST 2016
I suppose it would work, although "=>" is rather a descriptive symbol and
less a function.
But choosing between quoting:
"A + B => C"
and a regular function:
A + B %=>% C
probably quoting is the most straightforward, as the result of the foo()
function has to be a string anyways (which is parsed by other functions).
On Tue, Apr 12, 2016 at 6:20 PM, Richard M. Heiberger <rmh at temple.edu>
> Would making it regular function %=>%, using "%" instead of quotes,
> work for you?
> On Tue, Apr 12, 2016 at 11:09 AM, Adrian Dușa <dusa.adrian at unibuc.ro>
> > On Tue, Apr 12, 2016 at 2:08 PM, Duncan Murdoch <
> murdoch.duncan at gmail.com>
> > wrote:
> >> [...]
> >> It never gets to evaluating it. It is not a legal R statement, so the
> > parser signals an error.
> >> If you want to pass arbitrary strings to a function, you need to put
> > in quotes.
> > I see. I thought it was parsed inside the function, but if it's parsed
> > before then quoting is the only option.
> > To Keith: no, I mean it like this "A + B => C" which is translated as:
> > "the union of A and B is sufficient for C" in set theoretic language.
> > The "=>" operator means sufficiency, while "<=" means necessity. Quoting
> > the expression is good enough, I was just curious if the quotes could be
> > made redundant, somehow.
> > Thank you both,
> > Adrian
> > --
> > Adrian Dusa
> > University of Bucharest
> > Romanian Social Data Archive
> > Soseaua Panduri nr.90
> > 050663 Bucharest sector 5
> > Romania
> > [[alternative HTML version deleted]]
> > ______________________________________________
> > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> > and provide commented, minimal, self-contained, reproducible code.
University of Bucharest
Romanian Social Data Archive
Soseaua Panduri nr.90
050663 Bucharest sector 5
[[alternative HTML version deleted]]
More information about the R-help