【问题标题】:scatterplot3d trouble: " object of type 'closure' is not subsettable"scatterplot3d 麻烦:“'closure' 类型的对象不是子集”
【发布时间】:2015-02-10 20:07:15
【问题描述】:

当我尝试使用 scatterplot3d 包绘制数据集 (Data source) 的回归平面时收到错误消息。

错误提示:

scatterplot3d$plane3d 中的错误: “闭包”类型的对象不是子集

我可以轻松地绘制数据,但是当我尝试绘制拟合模型时会弹出错误。

这是我的代码:

scatterplot3d(CO2umol,NEE,GS,pch=20, highlight.3d=TRUE, main="NEE: AC vs EC vs MOD")
fit <- lm( GS ~ CO2umol+NEE,  OBSvsMOD_NEE_hourly)
scatterplot3d$plane3d(fit)

你有线索吗?我想知道NA,但我不太确定如何面对这个问题。

干杯!

【问题讨论】:

    标签: r plot closures lm


    【解决方案1】:

    试试这个:

    ss <- scatterplot3d(CO2umol,NEE,GS,pch=20, 
       highlight.3d=TRUE, main="NEE: AC vs EC vs MOD")
    fit <- lm( GS ~ CO2umol+NEE,  OBSvsMOD_NEE_hourly)
    ss$plane3d(fit)
    

    您应该使用scatterplot3d (ss$plane3d) 返回的对象的plane3d 元素,而不是试图在scatterplot3d 本身中找到plane3d 元素...

    【讨论】:

      猜你喜欢
      • 2016-01-14
      • 1970-01-01
      • 1970-01-01
      • 2017-06-01
      • 1970-01-01
      • 2014-08-01
      • 2015-06-18
      • 2021-12-26
      • 2022-07-22
      相关资源
      最近更新 更多