In lisp there is syntax to execute several expressions in sequence within function arguments. Given R's lispy origins, I'm wondering is there an equivalent feature in R? I'm imagining writing something like the following:
with(heat,
do(qqnorm(loss), qqline(loss)))
In R, brackets are used to group multiple statements in a "compound statement", which appears to be the role played by progn
in Lisp. As with progn
, all of the component statements are evaluated, but only the value of the final statement is returned.
with(mtcars,
{qqnorm(mpg); qqline(mpg)})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With