gpt4 book ai didi

r - 1 :object$nsdf : argument of length 0 when using plot. gam 中的错误

转载 作者:行者123 更新时间:2023-12-04 15:55:26 24 4
gpt4 key购买 nike

这个问题在这里已经有了答案:





R plot.gam Error "Error in 1:object$nsdf : argument of length 0"

(2 个回答)


3年前关闭。




尝试在 R 中绘制 gam 对象时,我看到错误消息:

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

我正在使用基本命令:
plot(myGamObject)

此错误并非特定于我使用的任何数据,因为它也会在例程结束时出现:
example(gam)

为了完整起见,这里有一些示例代码:
library(ISLR)
library(gam)
gam7 <- gam(wage~lo(year, span = 2) + s(age, 4) + maritl + education + health_ins + health + jobclass, data = Wage)
plot(gam7)

这是我的系统:
   sysname        release        version       nodename 
"Windows" ">= 8 x64" "build 9200" "MEANMACHINE4"
machine login user effective_user
"x86-64" "Julian" "Julian" "Julian"

最佳答案

我已更新到最新的 R 3.2.4,并更新了我的所有软件包,一切正常。

关于r - 1 :object$nsdf : argument of length 0 when using plot. gam 中的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35699399/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com