本文介绍了通用加性模型data.frame.default错误:尝试应用非功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用mgcv软件包运行通用的加性模型,但我不断收到model.frame.default错误:
I am trying to run a general additive model using the mgcv package, but I keep getting a model.frame.default error:
)na.action requires a function and you passed it a logical, (from ?bam)
基本上,在model.frame()中,您基本上是在要求R进行评估
Essentially, within model.frame() you were basically asking R to evaluate
TRUE(df)正确地引发错误,因为TRUE不是一个函数,而被称为一个函数.
which rightly throws an error as TRUE isn't a function yet was being called as one.
如果要省略带有NA的行,而不是在出现行失败时失败,请使用
If you want to omit rows with NAs rather than fail if they occur, use
na.action = na.omit这篇关于通用加性模型data.frame.default错误:尝试应用非功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!