[BioC] How to export dataframes to xls

January Weiner january.weiner at mpiib-berlin.mpg.de
Tue Nov 23 13:33:14 CET 2010


Dear Pankaj,

why don't you just write a CSV (comma- or tab separated) plain text
file? Excel will happily read it and import it into a single
spreadsheet. For this, you don't need anything beyond the standard
"write.table" function. You can write to an xls file, so that -- on a
Windows machine -- it opens automatically with Excel:

write.table( SomeDataFrame, file= "mydataframe.xls", sep= "\t", quote= F )

Here, I use "tab" as the separator and no quotes around string data /
factor names.

Cheers,
j.

On Thu, Nov 18, 2010 at 5:11 PM, pankaj borah
<pankajborah2k3 at yahoo.co.in> wrote:
>
>
>
>
>
> I have a     dataframe containing 104 columns and 30,000 rows.  I want
> to extract 104 columns to a single excel file as separate spreadsheet .
>
> Again each of the 104  columns are named  as say A1, A2, A3 ;
> B1,B2,B3; C1,C2,C3 in the dataframeetc. So, instead of exporting to 104 spreadsheets I
> want to export all the A , B, and C columns to a single spreadsheet.
>
>
>
> How do I do that? I am a learner in R" and not an expert.
>
>
>
> Thanks,
>
> Pankaj Barah
>
> Department of Biology,
> Norwegian University of Science & Technology (NTNU)
>  Realfagbygget, N-7491 Trondheim, Norway
>
>
>
>        [[alternative HTML version deleted]]
>
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>



-- 
-------- Dr. January Weiner 3 --------------------------------------
Max Planck Institute for Infection Biology
Charitéplatz 1
D-10117 Berlin, Germany
Web   : www.mpiib-berlin.mpg.de
Tel     : +49-30-28460514



More information about the Bioconductor mailing list