Try this:
myfunc <- function(...)table(...)
with(mydataset, myfunc(ages, sex))
On Thu, Aug 6, 2009 at 4:50 PM, Polwart Calum (County Durham and Darlington
NHS Foundation Trust) wrote:
> I may be doing this wrong! but I have a function which I have simplified a
> lot below. I want to pass some
I may be doing this wrong! but I have a function which I have simplified a lot
below. I want to pass some 'field names' of a data-frame to the function for
it to then do some manipulation of.
Here's my code:
#build a simple dataset
mydataset = data.frame (
ages=c('40-49','40-49','40-49','30-
2 matches
Mail list logo