Hello all,

I'd like to create a function which would do some analysis on a particular 
object, which should be specified in advance. Something like:

> ls()
[1] "aa" "bb" "cc"

Object <- "bb"
var.name <- "q2"
testfunction <- function(obj.name, var.name) {
  temp <- give.me.the.object.called(Object)
  table(temp[, var.name])
}

This should perfom the same thing as:
table(bb$q2)

Is this possible?
TIA,
Adrian

-- 
Adrian DUSA
Romanian Social Data Archive
1, Schitu Magureanu Bd
050025 Bucharest sector 5
Romania
Tel./Fax: +40 21 3126618 \
          +40 21 3120210 / int.101

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to