Hi all,

I am attempting to write an R fn that will accept multiple (but varying on
how many) objects (usually data frames) as inputs and return summary output.

What is the best way to pass the object names to the fn (I have thought of
2 options below) AND how do I then use the names inside the fn to reference
the actual object (I assume that I would need something like get(x[1]) for
example to have "d1" resolve the the object d1. Correct?

The 1st option I thought of was to pass the object names as a character
vector in the call to the fn:

set.matrix<-df.set(c("d1","d2","d3","d4","d5","d6","d7","d8"),by="ID")
2nd option: Is something like this possible:

set.matrix<-df.set(c(d1,d2,d3,d4,d5,d6,d7,d8),by="ID")

        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to