The following links may help navigating this page
WHO Disease Outbreak News

Time Series with R · 2006-10-18

Here's an archive containing all you need to print lovely oil and cocoa price time series plots. In the archive you'll find the price data in two .csv files and the R script to read them, make time series objects and plot. Very simple indeed, but they might be useful for intermediate learners to see how to handle time series using R.

  1. Juergen    Oct 18, 21:50    #
    what the hell is win.graph?

    > source(”/Users/juergenluebeck/Desktop/timeseries_plots/plot_time_series.R”)
    Error in eval.with.vis(expr, envir, enclos) :
    couldn’t find function “win.graph”
  2. haken    Oct 18, 22:05    #
    You may just drop it, it is platform specific. Works under windows and opens a graphic device with the given aspect ratio. Comes in handy when you run R on windows. You know, they won't let you run the system you want where ever you need R ;-)

    On unix derivates the command x11 should do the same. Try that.

    Since we already got into detail, here are two very nice introductions on how to analyse data with R by

    "Statistical Analysis with R"
    "Time Series Analysis with R"

    Thanks for that, guys. Pretty cool.
  3. Juergen    Oct 20, 19:03    #
    using plot() as described in the R-documentation instead fuckin’ win.graph() it works well, thx.
  4. haken    Oct 20, 23:05    #
    Maybe I'm not aware of the latest changes in R. I don’t know what version of R you use but I'd love you to get my point. Of course plot() works well without win.graph/x11 but still ... I’m using 2.2 (may be 2.4 provides better ways, would be good) ... using plot() here, how do I change the width and height of a plot? If I’d like to have my plots say with 10 inches width and 4 inches height, how do I do this? I need to call win.graph or x11 to open a properly sized device. Sometimes you need a way to pass height and width of a plot as in dev.print(). win.graph/x11 provide this way.

    Am I wrong? Paste code, please.

Commenting is closed for this article.