[R] write table and dinnames
Ott Toomet
siim at obs.ee
Mon Nov 4 17:22:41 CET 2002
Hi,
On Mon, 4 Nov 2002 AlessandroSemeria at cramont.it wrote:
|I would write in tab-text file a table like this one:
|
|TAB colname1 TAB colname2 TAB TAB... colnameN
|rowname1 # # #
|rowname2 # # #
I do not know any perfect solution. But you may consider:
1) add the missing tab by a text editor manually (or by a shell script).
2) If you are going to read the table later by R, then you really do not
need the tab
3) write the names with the tab to the file and thereafter append the table
to it. Something like
write.table(c("", names.matrix), sep="\t")
wirite.table(matrix, col.names=FALSE, append=TRUE)
4) write a tab to the file (eg, by write()) and thereafter append the table to it in the
usual form.
Perhaps it helps.
Best wishes,
Ott
--
Ott Toomet
otoomet at econ.au.dk
---------------------------------------------------------
(o_ (*_ (O_ (o< -! (o<)<
//\ //\ //\ //\ //\
V_/_ V_/_ V_/_ V_/_ V_/_
standard drunken shocked noisy penguin
penguin penguin penguin penguin eating fish
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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