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.
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:
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
;
>> 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
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.,
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
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
To read the data into R
1) I format my dates as -MM-DD in Excel (or OpenOffice Calc),
2) (change =na() to NA)
3) Check that required number of significant decimal places are displayed,
4) export as csv and
5) Use readSeries() function from Rmetrics timeSeries package to read
the data into R.
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
Tena koe
What do you want to control? You can govern the format used in R using the
appropriate R functions. I doubt it would be useful to have dates read from
Excel depend on the format set for displaying those dates in Excel.
HTH
Peter Alspach
> -Original Message-
> From: r-h
10 matches
Mail list logo