Skip to content
Prev 244107 / 398506 Next

[plyr] Question regarding ddply: use of .(as.name(varname)) and varname in ddply function

It's easiest to see what's going on if you use eval.quoted directly:

eval.quoted(.(cyl), mtcars)
eval.quoted(.("cyl"), mtcars)
eval.quoted(.(as.name("cyl")), mtcars)

But you shouldn't need to do any syntactic hackery because the default
method automatically parses the string for you:

eval.quoted(as.quoted("cyl"), mtcars)

Hadley

On Mon, Dec 6, 2010 at 6:22 PM, Sunny Srivastava
<research.baba at gmail.com> wrote: