[R] Why does debugging print() change output of function?

peter dalgaard
Tue, 09 Sep 2014 23:07:23 -0000

On 07 Sep 2014, at 00:31 , David Winsemius <dwinsemius at comcast.net>
wrote:

> The goal:
>   to create a function modeled after `subset` (notorious for its
non-standard evaluation) that will take a series of logical tests as unqiuoted
expressions to be evaluated in the framework of a dataframe environment and
return a dataframe of logicals:
...

A belated peep from the author of subset(): Don't!

I think we learned the hard way by now that it is much easier to pass
unevaluated expressions in the shape of formula objects or maybe expression
objects. Lots of pain can be avoided by slipping in a simple "~".

--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com