[R] Exporting a dataframe from R to Excel

Henrique Dallazuanna wwwhsd at gmail.com
Mon Feb 25 14:17:37 CET 2008


You have tried write.table?

write.table(x, file="file.xls", sep="\t", row.names=F)

On 25/02/2008, Nadia Theron <NadiaT at investec.co.za> wrote:
> I am trying to export a dateframe created in R:
>
>
>
>  > Duration_summary
>
>      V1      2.5 %   97.5 %       V4     2.5 %    97.5 %
>
>  [1,]  1 0.46076018 1.128776 1.000000 0.5280828 0.9576338
>
>  [2,]  0 0.00000000 0.000000 1.000000 0.1741793 1.2352705
>
>  [3,]  1 0.46566719 1.313711 1.000000 0.7233312 1.4097987
>
>  [4,]  1 0.38866371 2.453226 0.976024 0.6377314 1.3493957
>
>  [5,]  1 0.08894066 1.036830 1.000000 0.5270633 1.0901834
>
>
>
>  into a named are in Excel of the correct size, but I do not want to
>  export the rownames as well. I've tried using RODBC sqlUpdate:
>
>
>
>  sqlUpdate(channel=channel, dat=Duration_summary, index = NULL,verbose =
>  FALSE, test = FALSE,nastring = NULL, fast = TRUE)
>
>  Error in sqlUpdate(channel = channel, dat = Duration_summary, index =
>  NULL,  :
>
>         cannot update 'Duration_summary' without unique column
>
>  Please help...
>
>
>  http://www.investec.com/EmailDisclaimer/emaildisclaimer.htm
>
>  The disclaimer also provides our corporate information and names of our directors as required by law.
>
>  The disclaimer is deemed to form part of this message in terms of Section 11 of the Electronic Communications and Transactions Act 25 of 2002.
>  If you cannot access the disclaimer, please obtain a copy thereof from us by sending an email to: disclaimer at investec.co.za
>         [[alternative HTML version deleted]]
>
>  ______________________________________________
>  R-help at 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.
>


-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O



More information about the R-help mailing list