Hi, all. I'd like to print out a table to a file (I'm using cat(...,file="foobar")). the problem is, cat doesn't print out the headings for the table (making the table hard to interpret!). For example:> table(showdistribution(nw.109.transitions, interruptions[1]))interruption opened-map 1 2> cat(table(showdistribution(nw.109.transitions, interruptions[1])))1 2 how do I get the first format to show up in a file? thanks! greg -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Greg Trafton wrote:> > Hi, all. I'd like to print out a table to a file (I'm using > cat(...,file="foobar")). the problem is, cat doesn't print out the > headings for the table (making the table hard to interpret!). For > example: > > > table(showdistribution(nw.109.transitions, interruptions[1])) > > interruption opened-map > 1 2 > > > cat(table(showdistribution(nw.109.transitions, interruptions[1]))) > 1 2 > > how do I get the first format to show up in a file?See ?write.table Uwe Ligges -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Try write.table() Look up help(write.table) Jon -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Greg Trafton wrote:> > Hi, all. I'd like to print out a table to a file (I'm using > cat(...,file="foobar")). the problem is, cat doesn't print out the > headings for the table (making the table hard to interpret!). For > example: > > > table(showdistribution(nw.109.transitions, interruptions[1])) > > interruption opened-map > 1 2 > > > cat(table(showdistribution(nw.109.transitions, interruptions[1]))) > 1 2 > > how do I get the first format to show up in a file? >Try write.table(datasource,"path_to_file") -Tim -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._