[R] writing a table

2010-10-26 Thread lord12

When ever I write a table of columns to a csv file the columns are offset by
one column and do not match the column headers. How do I align my columns
with the column headers? Also, how do I change the name of my column
headers. 
-- 
View this message in context: 
http://r.789695.n4.nabble.com/writing-a-table-tp3014821p3014821.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] writing a table

2010-10-26 Thread Remko Duursma

This probably fixes it, although an example would be nice :

write.csv(dfr, row.names=FALSE)

you change the names with the ?names function before writing it to a csv
file.


remko
-- 
View this message in context: 
http://r.789695.n4.nabble.com/writing-a-table-tp3014821p3014839.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] writing a table in the device (pdf in this case)

2008-05-12 Thread Greg Snow
You probably want to look at Sweave in the utils package or the odfWeave 
package.

Both let you set up a planned set of commands interspersed with text (notes, 
explanations, full report, etc.) and then you process the file and get the 
output (and commands) in either a LaTeX file or an OpenOffice writer document, 
either of which can then be processed to a pdf file.  Both give several options 
for what input/output to return, inclusion of tables and graphs, and much more.

Hope this helps,

--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111



 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Julien Colomb
 Sent: Saturday, May 10, 2008 9:47 AM
 To: r-help@r-project.org
 Subject: [R] writing a table in the device (pdf in this case)

 hello all,
 I would like to introduce a summary table into the pdf along
 with the plots (in order to archive my data into single files
 automatically).
 Similarly, It would be great to have the result of the
 statistical analysis (for instance anova) in the same file.

 Is there a way to do that?


 example:
 pdf(example.pdf)
 layout (matrix(1:2,1,2))
 plot (groups, scores)

 Result - cbind (samplesize, mean_score, sem_score)
 #calculated before ???

 dev.off ()
 --
 ___

 Dr. Julien Colomb

 Genes et Dynamique des Systemes de Memoire CNRS UMR 7637
 ESPCI 10 rue Vauquelin
 75005 Paris
 France
 www.gdsm.espci.fr

 tel +33 (0)1 40 79 51 23
 fax +33 (0)1 40 79 52 29

 AIM (ichat) or skype: thrawny1
 [[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.