Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to define multiple aggregation functions in custom number/order outside of dcast and then pass it to dcast fun parameter.
I try to achieve something like that:
dt <- data.table(x=sample(5,20,TRUE), y=sample(2,20,TRUE), z=sample(letters[1:2], 20,TRUE), d1 = runif(20), d2=1L) functions <- list(sum,mean) dcast(dt, x + y ~ z, fun=functions, value.var="d1")
But I get the error message:
Error in eval(expr, envir, enclos) : could not find function "functions"
The text was updated successfully, but these errors were encountered:
Related to this SO question and issue #1369.
Sorry, something went wrong.
dup of #1369
No branches or pull requests
I want to define multiple aggregation functions in custom number/order outside of dcast and then pass it to dcast fun parameter.
I try to achieve something like that:
But I get the error message:
The text was updated successfully, but these errors were encountered: