Re: [R] reading dates in Excel into R

2010-08-03 Thread 500600
I sometimes had trouble importing data that was exported from Excel. Exporting through OpenOffice sometimes resolved the issue. -- View this message in context: http://r.789695.n4.nabble.com/reading-dates-in-Excel-into-R-tp2306830p2311374.html Sent from the R help mailing list archive at Nabble.

Re: [R] reading dates in Excel into R

2010-08-02 Thread Erich Neuwirth
RExcel (available as an Excel Addin in Windows only) tries very hard to transfer dates and times faithfully to R. The package RExcelInstaller on CRAN will install it. On Jul 29, 2010, at 7:32 PM, Hongying Li wrote: > > I am reading dates in Excel2007 into R. > > Here are the functions I used:

Re: [R] reading dates in Excel into R

2010-07-31 Thread Hans-Peter Suter
2010/7/30 Dimitri Liakhovitski : > I've wasted a lot of time trying to read in dates from Excel. Even > importing .csv files has not guarantees and often produces garbage > instead of dates. > What I found works best is saving the Excel data base as a > tab-delimited file .txt (after having formatt

Re: [R] reading dates in Excel into R

2010-07-30 Thread Gray Calhoun
; >> Date: Fri, 30 Jul 2010 10:24:50 +0100 >> Subject: Re: [R] reading dates in Excel into R >> From: fra...@gmail.com >> To: peter.alsp...@plantandfood.co.nz >> CC: colorl...@hotmail.com; r-help@r-project.org >> >> To read the data into R >> 1) I fo

Re: [R] reading dates in Excel into R

2010-07-30 Thread Dimitri Liakhovitski
I've wasted a lot of time trying to read in dates from Excel. Even importing .csv files has not guarantees and often produces garbage instead of dates. What I found works best is saving the Excel data base as a tab-delimited file .txt (after having formatted the dates in the format you need, e.g.,

Re: [R] reading dates in Excel into R

2010-07-30 Thread Gabor Grothendieck
On Fri, Jul 30, 2010 at 1:17 PM, Hongying Li wrote: > >  I just do not want the dates format change randomly (seems to me) each time > I read it from excel2007 file into R. > When I export the excel2007 fiel into csv file and use read.csv function then > the dates all come out good (as mm/dd/yyy

Re: [R] reading dates in Excel into R

2010-07-30 Thread Hongying Li
before reading into R. Just avoid reading from Excel2007 files directly. Thanks, Hongying > Date: Fri, 30 Jul 2010 10:24:50 +0100 > Subject: Re: [R] reading dates in Excel into R > From: fra...@gmail.com > To: peter.alsp...@plantandfood.co.nz > CC: colorl...@hotmai

Re: [R] reading dates in Excel into R

2010-07-30 Thread John C Frain
; Sent: Friday, 30 July 2010 5:33 a.m. >> To: r-help@r-project.org >> Subject: [R] reading dates in Excel into R >> >> >> I am reading dates in Excel2007 into R. >> >> Here are the functions I used: >> >> library(RODBC) >> channel<-odbcCo

Re: [R] reading dates in Excel into R

2010-07-30 Thread 500600
Does function ?strptime help you in any way? -- View this message in context: http://r.789695.n4.nabble.com/reading-dates-in-Excel-into-R-tp2306830p2307744.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing l

Re: [R] reading dates in Excel into R

2010-07-29 Thread Peter Alspach
rom: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Hongying Li > Sent: Friday, 30 July 2010 5:33 a.m. > To: r-help@r-project.org > Subject: [R] reading dates in Excel into R > > > I am reading dates in Excel2007 into R. > > Here are t

[R] reading dates in Excel into R

2010-07-29 Thread Hongying Li
I am reading dates in Excel2007 into R. Here are the functions I used: library(RODBC) channel<-odbcConnectExcel2007("myfile.xlsx") tmp<-sqlFetch(channel,"1",as.is=T) The dates in myfile.xlsx are all in this format: mm/dd/. But when I read it to R, some columns look like "-mm-dd 00:00: