[R] write

Pesl Thomas thomas.pesl at arcs.ac.at
Thu Aug 31 17:17:46 CEST 2000


i want to write an output created by table() to a file to my disc

> tab
   
or    1  2  3  4  5  6
  1  57 80 25 23 46 23
  2 106 35 59  8 51 40

> write(tab,"h:/tab.txt")

when i do it that way, the text file is a sort of mess:

57 106 80 35 25
59 23 8 46 51
23 40

i tried it with write.table but:
>Error in as.data.frame.default(x[[i]], optional = TRUE) : 
>        can't coerce table into a data.frame

so what is the problem?

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