On Wed, 23 Aug 2006, [EMAIL PROTECTED] wrote: > Hi, > > search on web indicates that R also includes a hist method on POSIXct > vectors.
> methods(hist) [1] hist.Date* hist.default hist.POSIXt* Non-visible functions are asterisked so almost (objects of class POSIXct inherit from class POSIXt). > My (perhaps too unexperienced) approach below yields an error. > > Could somebody give me a hint what's wrong ? samples is a data frame, not an object of class "POSIXct". Try hist(samples$DateTime). (And thanks for giving enough detail to enable us to spot the problem.) > > 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 > > ______________________________________________ > [email protected] 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. > -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ [email protected] 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.
