On Wed, Aug 18, 2010 at 12:10 PM, JesperHybel <jesperhy...@hotmail.com> wrote: > f<-function(x,y){ table(x,y
If you look at the code for 'plot', you'll see it does that with some deparse/substitute magic. Then use the dnn option to table to set the names: f<-function(x,y){ table(x,y,dnn=c(deparse(substitute(x)),deparse(substitute(y))))} Barry ______________________________________________ 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.