[R] Plotting a date variable after GAM

Shige Song shigesong at gmail.com
Tue Dec 13 02:49:39 CET 2011


Dear All,

I am fitting a simple GAM model using the "gam" function in the "mgcv"
package. The only independent variable is a continuous variable
representing the time of the event (in year and month) coded so that
"0" represents January 1960, "1" represents February 1960, etc. Now
when I try to plot the results, my x-axis ranges from "-200" to "200",
what I want is to convert these number into something like "1950-01"
or "Jan. 1950". What is the best way to do this?

Many thanks.

Best,
Shige



More information about the R-help mailing list