Error 1: $ nsdf object: argument of length 0 when using plot.gam

I see an error message when trying to build a gam object in R:

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

I use the main command:

 plot(myGamObject) 

This error is not specific to any data that I use, as it also appears at the end of the procedure:

 example(gam) 

For completeness, here is an example 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" 
+5
source share
1 answer

I updated to the latest R 3.2.4 and updated all my packages, and everything works for me.

0
source

Source: https://habr.com/ru/post/1244106/


All Articles