[R] cat output To data.frame.rows ?

Christian Schulz c.schulz at metrinomics.de
Thu Jun 20 15:35:03 CEST 2002


Hi,
is there a possibilty  to get my function output with "cat "
as data.frame.rows with variables ?

Var1---------------- 8 15 1 3
Var2---------------- 0.170 0.319 0.0213 0.0638
Var3---------------- 83.8 88.6 90 75
Var4---------------- 84.3 84.3 100 83.3
Var5---------------- 62.5 56 20 53.3
            function(data.frame) {
       ....
        ....
       cat("Var1",Var1.r,"\n")
       cat("Var2",Var2.r,"\n")
       cat("Var3",Var3.r,"\n")
       cat("Var4",Var4.r,"\n")
       cat("Var5",tapply(VAR.X,VAR.X,mean,na.rm=TRUE),"\n")
         }

example:
Var1    Var2    Var3     Var4     Var5
23        34        65        67           56
56        54        54        34            45
15        25        34        34            23


really  thanks for advance & regards,christian


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list