Closed volokhonsky closed 11 years ago
Are you sure the problem comes from questionr
? I can't reproduce it here with the following aggregate
example :
aggregate(state.x77, list(Region = state.region),FUN=function(x) c(mean =mean(x), s_d =sd(x)))
This comes from package:memisc
and only applies to aggregate.formula
. memisc
has its own "improved" version of aggregate formula i.e. aggregate(y ~ x, data = foo, FUN = mean)
becomes aggregate(mean(y) ~ x, data = foo)
. I'm not sure why it persists after detaching memisc
... Anyways, it is not a problem with questionr
or really a bug for that matter. Although it is really annoying that someone would change a function like aggregate
in their package
Thanks @volokhonsky for reporting, and thanks @jlburkhead for tracking and pointing out this issue.
After using questionr package i have problem with aggregate
tab1<-aggregate(form, data=aqm, FUN=function(x) c(mean =mean(x), s_d =sd(x)))
Error in eval(expr, envir, enclos) : can't find function "fapply"
After detach questionr the problem does not go away, needs restart R.