[R] "timeDate" package: Read dates from xls or txt

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Tue Sep 30 03:01:11 CEST 2014

If you read the documentation for that package you will find that the answer is no, for the simple reason that it doesn't do input or output. It does help you with conversions between POSIXt types, and can help figure out which days are holidays or weekends, but you need the date in character format to start.

For reading in CSV data I use as.is=TRUE or stringsAsFactors=FALSE in my call to read.csv. For reading xls files I have had difficulties, which is why I prefer to export Excel data to CSV before reading it into R.  One XLConnect bug workaround I have used is to convert the timestamp column into character using as.character with specified format and then back using as.POSIXct and a specified timezone, but it was borne of desperation and may not always be necessary or even sufficient.

Please post using plain text rather than HTML format on this list. Only you can prevent your postings from being garbled.
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
Sent from my phone. Please excuse my brevity.

On September 29, 2014 2:47:01 AM PDT, jpm miao <miaojpm at gmail.com> wrote:
>   timeDate package create a date vector like this:
>   Dates <- c("1989-09-28","2001-01-15","2004-08-30","1990-02-09")
>   I have a date whose size is large. Could this package read the dates
>from xls or txt files? Could we convert the read vector (e.g., I
>use XLConnect to read xls files) to the date?
>   Thanks,
>	[[alternative HTML version deleted]]
>R-help at r-project.org mailing list
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list