Skip to content

quotation problem/dataframe names as function input argument.

2 messages · Sean Zhang, David Winsemius

#
I think you are making it too hard. See if one of these is a path to  
the answer you seek:

 > get(dframe.vec)
   V1 V2
1  1  2

#----
 > n.obs <- function(x) dim(x)
 > n.obs(get(dframe.vec))
[1] 1 2

#-------
 > ng.obs <- function(x) dim(get(x))
 > ng.obs(dframe.vec)
[1] 1 2

#-----
 > ng1.obs <- function(x) dim(get(x)[1])
 > ng1.obs(dframe.vec)
[1] 1 1

Best;
David Winsemius
On Dec 23, 2008, at 3:53 PM, Sean Zhang wrote: