Skip to content
Prev 371285 / 398530 Next

quote()/eval() question

On 08/09/2017 7:55 PM, Axel Urbiz wrote:
magrittr pipes are just syntactic sugar.  What your second line does is 
the same as

eval(df, mySummary)

which makes no sense.  These would work:

eval(df, expr = mySummary)
eval(mySummary, envir = df)

You could write the first as

df %>% eval(expr = mySummary)

and the second as

df %>% eval(mySummary, envir = .)

Duncan Murdoch