You might check one of the other methods of reading Excel
spreadsheets. If you google for R Wiki Excel and then click on Cached
(since the R Wiki seems to be down at the moment) various alternatives
are listed.
On Thu, Jan 7, 2010 at 12:32 AM, chrisli1223
wrote:
>
> Hi all,
>
> I have imported a
There is an alternative through strsplit() when the desired output format is
numeric (fractional hours on 0-24 scale).
> aa <- c("3:00","11:42")
> bb <- strsplit(aa,":")
> bb
[[1]]
[1] "3" "00"
[[2]]
[1] "11" "42"
> cc <- sapply(bb,function(x){as.numeric(x[1])+as.numeric(x[2])/60})
> cc
[1] 3
Hi:
Let
x <- '3:00'
The R package for data that are only dates or only times is chron. For
times,
it appears that the strings need to be in the form hh:mm:ss on a 24-hour
clock, so for
example, 1:30 PM should be expressed as 13:30:00. [I didn't see any option
for a
12-hour clock with an optional
Hi all,
I have imported a value 3:00 from Excel into R using read.csv. I want R to
recognise it as 3:00am (time data). How do I do it?
Thanks in advance,
Chris
--
View this message in context:
http://n4.nabble.com/R-treating-time-tp1008608p1008608.html
Sent from the R help mailing list archive
4 matches
Mail list logo