> I could of course do this the tedious way by simply entering > the name-strings "G1", "G2" as arguments as well as the variable > names G1, G2, in a call like > > meds3x3(G1,G2,"G1","G2") > > But I'd like to simply be able to pick up, within the function, > the names of the variables that were used as arguments in the > function call.
does the following help Ted? test <- function(x) { actual <- deparse(substitute(x)) paste('argument passed was called', actual) } test(happy) test(apple) ______________________________________________ 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.