On Fri, 10 Feb 2017, Sven Schreiber wrote:
I'm leaning more and more towards the position that unconditional
substitution would either have to be banned in 'foreign' or should be user
configurable (as in "foreign language=R --strsubst=on").
Because I have verified that the "@" character also has its own meaning in R:
https://stat.ethz.ch/R-manual/R-devel/library/methods/html/slot.html
So if a script author requests string substitution for a foreign block, it
would be her/his responsibility to avoid such ambiguities. It could also be
useful to have this choice on a block-per-block basis and not for the entire
script (as the above suggestion would ensure).
Don't know how much effort the implementation would imply.
It would be quite easy to implement a "set" variable named
"string_subst" (or similar) with "on" and "off" values. This
is
something I've thought about before but never got around to.
If you have a complex script that you know does not use string
substitution you could do "set string_subst off" at the top, and the
script should run faster, though I don't know how noticeable that
would be without trying it. You could also toggle this variable around
foreign blocks.
Allin