[R] Plotting a date variable after GAM

Shige Song
Tue, 13 Dec 2011 01:49:39 -0000

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