[R] Time data

From: Gregory Pierce <pierce.gregory_at_gmail.com>
Date: Wed, 13 Apr 2011 17:29:17 -0400

Hello fellow R-users,

I have a data set that includes times in the hh:mm format. I am uncertain how to tell R that it is time data. Currently when I try to calculate a mean with this time subset, I get an error message:

> mean(mar2011stats$TT)

[1] NA
Warning message:
In mean.default(mar2011stats$TT) :
  argument is not numeric or logical: returning NA

TT is the column label under which I have stored my time data: (for example, 1:24 to represent one hour and twenty four minutes).

Do I have to convert everything to minutes so that R can deal with it as it would other numerical values?


        [[alternative HTML version deleted]]

R-help_at_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. Received on Thu 14 Apr 2011 - 06:38:50 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 14 Apr 2011 - 11:40:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive