I have used xlsReadWrite to read data from an Excel spreadsheet.
I had a problem with converting times of the day so that I could create POSIXct date-time objects. I was wondering if there was a better solution.
Excel stores times of the day as fractions of a day so I wrote a function to convert the fraction to a number of seconds, extract the hours, minutes and seconds and output it in ISO standard format (%H:%M:%S).
Given a date obtained from an Excel date using as.Date I could then make up my POSIXct date-time objects.
This seems like it would be such a standard operation that there may be existing solutions that I have missed.
Any comments, advice? David Scott _________________________________________________________________ David Scott Department of Statistics The University of Auckland, PB 92019 Auckland 1142, NEW ZEALAND Phone: +64 9 373 7599 ext 85055 Fax: +64 9 373 7018 Email: d.sc...@auckland.ac.nz Graduate Officer, Department of Statistics Director of Consulting, Department of Statistics ______________________________________________ R-help@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.