[R] how to get a histogram of an POSIXct vector ?

From: <Peter.Marx_at_knorr-bremse.com>
Date: Wed 23 Aug 2006 - 21:06:14 EST


Hi,

search on web indicates that R also includes a hist method on POSIXct vectors.

My (perhaps too unexperienced) approach below yields an error.

Could somebody give me a hint what's wrong ?

Peter

> str(samples)

`data.frame': 7500 obs. of 1 variable:
 $ DateTime:'POSIXct', format: chr "2006-07-20 00:10:08" "2006-07-20 00:11:17" "2006-07-20 00:11:23"

>hist(samples)

Error in hist.default(samples) : 'x' must be numeric



R-help@stat.math.ethz.ch 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 Wed Aug 23 21:10:18 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 24 Aug 2006 - 02:22:46 EST.

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