Hello R-helpers, I'm writing a long function in which I manipulate a certain number of datasets. I want the arguments of said function to allow me to adapt the way I do this. Among other things, I want my function to have an argument which I will pass on to subset() somewhere inside my function. Here is a quick and simplified example with the iris dataset. myfunction<-function(table, extraction) { table2<-subset(table, extraction) return(table2) } myfunction(iris, extraction= Species=="setosa") ############## end What I would like is for this function to return exactly the same thing as : subset(iris, Species=="setosa") Thanks for your help. Regards, David Gouache
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.