Just for the record, here are my steps for producing a date based histogram. Data is stored in a file where each line only has a date - 2007/02/16
>d<-readLines("filename.dat") >d<-as.Date(d, format="%Y/%m/%d") >pdf(yearly.pdf) >hist(d, "years") >dev.off() Instead of "years" you can also use "days", "weeks", "months", "secs", "mins", "hours". One final question, how could I easily filter my dataset if, for instance, I only wanted to see results from 2006 ? Thanks to all who helped, Sérgio Nunes On 2/15/07, Sérgio Nunes <[EMAIL PROTECTED]> wrote: > Hi, > > I have several files with data in this format: > > 20070102 > 20070102 > 20070106 > 20070201 > ... > > The data is sorted and each line represents a date (YYYYMMDD). I would > like to analyze this data using R. For instance, I would like to have > a histogram by year, month or day. > > I've already made a simple Perl script that aggregates this data but I > believe that R can be much more powerful and easy on this kind of > work. > > Any suggestions on where to start? > > Thanks in advance, > Sérgio Nunes > ______________________________________________ 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.