Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in 1:object$nsdf : argument of length 0 when using plot.gam [duplicate]

Tags:

r

gam

I am seeing the error message when trying to plot a gam object in R:

Error in 1:object$nsdf : argument of length 0

I am using the basic command:

plot(myGamObject)

This error is not specific to any data I am using as it also comes up at the end of the routine:

example(gam)

For completeness, here is some sample code:

library(ISLR)
library(gam)
gam7 <- gam(wage~lo(year, span = 2) + s(age, 4) + maritl + education + health_ins + health + jobclass, data = Wage)
plot(gam7)

and here is my system:

   sysname        release        version       nodename 
 "Windows"     ">= 8 x64"   "build 9200" "MEANMACHINE4" 
   machine          login           user effective_user 
  "x86-64"       "Julian"       "Julian"       "Julian" 
like image 595
julianhatwell Avatar asked Feb 29 '16 12:02

julianhatwell


1 Answers

I have updated to the latest R 3.2.4, and updated all my packages and I've got everything working.

like image 196
julianhatwell Avatar answered Sep 23 '22 19:09

julianhatwell