Hacker News new | past | comments | ask | show | jobs | submit login
R by example (mayin.org)
101 points by abeppu on May 26, 2010 | hide | past | favorite | 4 comments



If anyone is interested in a more 'comprehensive' guide to R, take a look at http://www.davidrosenberg.me/academic/ . Towards the bottom of that page are six chapters I have written for an 'Intro to numerical programming' course I've been teaching with R. My text is targeted towards first year graduate students and medical students, but (if nothing else) provides a large number of problems and solutions.

The Sweave/LaTeX source is also available if anyone is interested.


Hey David,

I've just started using R and one thing that I've been looking for is a way to display discrete events on a timeline. It doesn't have to be anything fancy, all I want is to put hours/days on one axis and then put a marker and some text above it. Do you know of any built in libraries that do that?

Something like this: http://www.simile-widgets.org/timeline/

but it doesn't have to be near that nice..

Thanks in advance


One of the best all-around plotting packages for R (in my opinion) is Hadley Wickham's ggplot2 .

Take a look at the following pages: http://had.co.nz/ggplot2/scale_datetime.html http://had.co.nz/ggplot2/geom_line.html

While not specifically inentended as a 'time-series' package, ggplot2's facilities handle time-series data well. Ggplot2 is available on CRAN (i.e. install.packages('ggplot2'); ).

In truth, you don't even have to use a special package if the 'prettiness isn't important.'

df <- data.frame( day7 = start + round(runif(100, max = 7 * 86400)), hour10 = start + round(runif(100, max = 10 * 3600)), y = runif(100) ); plot(df$day7, df$y); plot(df$hour10, df$y);


Excellent, thanks.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: