Dear all,
i want to give the names of columns of a data set (dat) as parameter to a
function,
in order to select single rows by the row names.
I tried several ways.
Like:
the data set :
dat
A B C D E
1 2 3 1 6
1 4 5 2 4
.. .. .. .. ..
the.col.names<-c("A","C")
f<-function(par){sapply,function(par)(dat$par*2)}
f(the.col.names)
Should give the result
A C
2 6
2 10
.. ..
Thank you in advance
Johannes Schnitzler
[EMAIL PROTECTED]
______________________________________________
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help