You could try using the non-formula interface to aggregate.
Note that the following two calls to aggregate are equivalent but
the second (using the non-formula interface) makes the response column
a variable:
> df <- data.frame(Y1=1:10, Y2=101:110, Group=rep(letters[1:3], c(3,3,4)))
> aggrega
How can I parameterize the function call to aggregate() below with colx (a
character string) in the following code? That is, replace both if
statements with aaa <- aggregate(colx_something, data=tidy[grpyrs,],sum).
I've tried a couple of ideas for "colx_something" but get an R-error each
time. B
2 matches
Mail list logo