Re: [R] Variables in a Tabular form. easily saved in a txt file

2012-07-26 Thread arun
=FALSE) #contents of dat7.txt Postal.Code|Superb City1   |2134|2 City2   |254|5 City3   |12|54433 A.K. - Original Message - From: Alaios To: R help Cc: Sent: Thursday, July 26, 2012 7:29 AM Subject: [R] Variables in a Tabular form. easily saved in a txt file Dear all, I would like t

Re: [R] Variables in a Tabular form. easily saved in a txt file

2012-07-26 Thread John Kane
erb) dat1 Both of these can be save to a text file using ?write.table John Kane Kingston ON Canada > -Original Message- > From: ala...@yahoo.com > Sent: Thu, 26 Jul 2012 04:29:07 -0700 (PDT) > To: r-help@r-project.org > Subject: [R] Variables in a Tabular form. easily sa

Re: [R] Variables in a Tabular form. easily saved in a txt file

2012-07-26 Thread arun
uot;,file="clipboardnew") #another way to save it on plot. library(plotrix)  plot(0:3,0:3,xlab="",ylab="",type="n",axes=FALSE)  addtable2plot(1,1,dat1,cex=1) A.K. - Original Message ----- From: Alaios To: R help Cc: Sent: Thursday, July 26, 20

Re: [R] Variables in a Tabular form. easily saved in a txt file

2012-07-26 Thread Eik Vettorazzi
Hi Alex, sprintf with left alignment might be a start: cat(sprintf("%-7s| %-12d| %-5d",paste("City",1:3,sep=""),(12345)%/%10^c(1:3),c(2,5,54433)),sep="\n") #cat has also a file option, see ?cat. but acutally your given output doesn't look like a conventional table but much more like this: cat(sp

[R] Variables in a Tabular form. easily saved in a txt file

2012-07-26 Thread Alaios
Dear all, I would like to save few variable-names with their values in a tabular form, with that I mean that files can be printed easily in R in a tabular form and also saved in a ascii file that when one opens it see also the variables in a nice tabular format. IS that possible? Below a small