gpt4 book ai didi

Error in angle_model$edd : $ operator not defined for this S4 class(ANGLE_MODEL$EDD中出错:没有为此S4类定义$运算符)

转载 作者:bug小助手 更新时间:2023-10-25 11:48:47 26 4
gpt4 key购买 nike



This seem to be a recurrent error message but solutions seem to be rather case specific for what I'm seeing (I'm starting with R so every step is difficult for me still). I'm following the script for a estimation of density with camera traps and after finding solutions for every problem on my own, I got to this last one just at the end, and I don't know hot to fix it. The part of the script I'm following is this:

这似乎是一个反复出现的错误消息,但解决方案似乎针对我所看到的特定情况(我从R开始,所以每一步对我来说仍然很难)。我正在按照脚本使用相机陷阱估计密度,在我自己找到每个问题的解决方案后,我在最后一个问题上找到了答案,我不知道如何修复它。我正在遵循的脚本部分如下:


Last section of the script

剧本的最后一节


And I got stuck with param <- get_parameter_table(rad, ang, spd, act)

我被参数<-GET_PARAMETER_TABLE(rad,ang,spd,act)困住了


When I run it it says this:

当我运行它时,它是这样说的:


Error in angle_model$edd : $ operator not defined for this S4 class

ANGLE_MODEL$EDD中出错:没有为此S4类定义$运算符


The same error occurs if I just run rad, spd or act alone.

如果我只运行rad、spd或单独操作,也会出现相同的错误。


When I ask RStudio to show Traceback it says this:

当我要求RStudio显示回溯时,它会这样说:


Traceback

回溯


What could I do to fix it?

我能做些什么来修复它呢?


Thanks in advance.

先谢谢你。


更多回答
优秀答案推荐

This error means that you cannot use the $ operator with the angle_model object. You will have to find some other way to access the parts of it. Check the package documentation for any way they have provided, but failing that you may be able to use the @ operator, which gets the slots (similar to attributes, but not quite the same) of the object.

该错误意味着不能将$运算符与ANGLE_MODEL对象一起使用。你必须找到其他方法来访问它的各个部分。请查看包文档以了解它们提供的任何方式,但如果不是这样,您可以使用@运算符,它将获得对象的槽(类似于属性,但不完全相同)。


Alternatively, you might be able to use the [ or [[ operators instead of $, e.g. angle_model[["edd"]].

或者,您也可以使用[或[[运算符而不是$,例如ANGLE_MODEL[[“EDD”]]。


更多回答

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