Hello, I wanna know how to export a data frame to Excel. For example I wanna export this data frame> M[1:5,]var1 var2 distance 1 41 42 0.2 2 41 43 0.304347826086957 3 41 46 0.19047619047619 4 41 47 0.155555555555556 5 41 48 0.209302325581395 I don't know how to use write.table or write.csv to do this. Can you help me please? Thanks. _____________________________________________________________________________ l [[alternative HTML version deleted]]
Hello, I wanna know how to export a data frame to Excel. For example I wanna export this data frame> M[1:5,]var1 var2 distance 1 41 42 0.2 2 41 43 0.304347826086957 3 41 46 0.19047619047619 4 41 47 0.155555555555556 5 41 48 0.209302325581395 I don't know how to use write.table or write.csv to do this. Can you help me please? Thanks. ====. I use Rcmdr (R commander) for that. Once you have a dateset, you can export it as a CSV file. Translating fomr my French Rcmdr interface, that would be in "Data/Active Dataset/Export active dataset. You probably have to create a subset first (to get M[1:5,]) and Rcmdr allows you to do that. HTH, Yves Moisan _____________________________________________________________________________ -- View this message in context: http://www.nabble.com/export-csv-tf4548263.html#a12979478 Sent from the R help mailing list archive at Nabble.com.
?write.csv --- elyakhlifi mustapha <elyakhlifi_mustapha at yahoo.fr> wrote:> Hello, > I wanna know how to export a data frame to Excel. > For example I wanna export this data frame > > > M[1:5,] > var1 var2 distance > 1 41 42 0.2 > 2 41 43 0.304347826086957 > 3 41 46 0.19047619047619 > 4 41 47 0.155555555555556 > 5 41 48 0.209302325581395 > > I don't know how to use write.table or write.csv to > do this. > Can you help me please? > Thanks. > > > >_____________________________________________________________________________> > > l > [[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. >
Did you try reading the help pages or looking at the examples in the help pages? Did you even make an attempt at using the command? If so, did you get an error or unexpected results? I don't know how you can expect people to help you when you appear to have made no effort yourself. On 10/1/07, elyakhlifi mustapha <elyakhlifi_mustapha at yahoo.fr> wrote:> Hello, > I wanna know how to export a data frame to Excel. > For example I wanna export this data frame > > > M[1:5,] > var1 var2 distance > 1 41 42 0.2 > 2 41 43 0.304347826086957 > 3 41 46 0.19047619047619 > 4 41 47 0.155555555555556 > 5 41 48 0.209302325581395 > > I don't know how to use write.table or write.csv to do this. > Can you help me please? > Thanks. > > > _____________________________________________________________________________ > > l > [[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. >