我已按照以下方式在R for Windows中安装了CHAID
个包:
Rtools31.exe
install.packages("CHAID", repos = "http://R-Forge.R-project.org", type = "source")
当我尝试查看CHAID的帮助文档时,我运行:?CHAID() 出现以下错误消息:
"Error in .helpForCall(topicExpr, parent.frame()) :
no methods for ‘chaid’ and no documentation for it as a function"
这意味着尚未安装CHAID
包?
当我运行installed.packages()
时,会出现以下行:
Package LibPath Version Priority
CHAID "CHAID" "C:/Users/JJJJJJ/Documents/R/win-library/3.1" "0.1-1" NA
答案 0 :(得分:3)
根据您所写的内容,您似乎已正确安装了CHAID
包。要在R中使用它,您需要通过
library("CHAID")
,主拟合函数为chaid()
。要查看其手册页,您可以使用
?chaid
help("chaid", package = "CHAID")
并且可以通过
执行一些示例example("chaid", package = "CHAID")