简体   繁体   English

R中的CSPADE方法抛出错误:类“ transactions”的此对象的名称为“ transactionInfo”的插槽不存在

[英]CSPADE method in R throws ERROR: no slot of name “transactionInfo” for this object of class “transactions”

I get error in R when running the following method for CSPADE algorithm (finding association rules in transactions): 当对CSPADE算法运行以下方法时(在事务中查找关联规则),R出现错误:

x <- read_baskets(con = system.file("misc", "zaki.txt", package = "arulesSequences"), info = c("sequenceID","eventID","SIZE"))

s1 <- cspade(x, parameter = list(support = 0.4), control = list(verbose = TRUE))
parameter specification:
support : 0.4
maxsize :  10
maxlen  :  10

algorithmic control:
bfstype  : FALSE
verbose  :  TRUE
summary  : FALSE
tidLists : FALSE

preprocessing ...
Error in typeof(x) : 
  no slot of name "transactionInfo" for this object of class "transactions"

"x" is a transaction object and it gets successfully created but for some reason the cspade method does not work (even on its classic data set which is provided in its documentation) “ x”是一个事务对象,已成功创建,但是由于某种原因cspade方法不起作用(即使在其文档中提供的经典数据集上也是如此)

Probably too late but for next readers, I think this bug appeared after an upgrade of the package. 可能为时已晚,但对于下一个读者来说,我认为此错误是在软件包升级后出现的。

Just add : 只需添加:

attributes(x)$transactionInfo <- x@itemsetInfo

after creating x with read_baskets() 用read_baskets()创建x之后

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用arulesSequences在R中进行cSPADE数据挖掘 - 转换为“事务”格式时出错 - cSPADE data mining in R using arulesSequences - Error while converting to “transactions” format arulesSequences 中的 cspade 函数抛出连接错误 - cspade function in arulesSequences throws connection error 运行Cspade-R时系统调用错误 - System Invocation Error when Running Cspade - R runMI function 错误:'对于 class "lavaanList" 的此 object 没有名称为 "internalList" 的插槽' - runMI function error: 'no slot of name "internalList" for this object of class "lavaanList"' 更新R类方法中的槽的值 - Update value of a slot within an R class method arulesSequences cspade函数:“ file(con,“ r”)中的错误:无法打开连接” - arulesSequences cspade function: “Error in file(con, ”r“) : cannot open the connection” S4类:用另一种方法更新插槽而不返回对象(R) - S4 class: update slot in another method without returning the object (R) 在OpenMx 2中,错误:对于该类“ MxRAMModel”的对象,名称为“ objective”的插槽没有什么意思? - In OpenMx 2, what does Error: no slot of name “objective” for this object of class “MxRAMModel” mean? 有没有办法将 R6 对象分配给 S4 对象槽? - Is there a way/method to assign a R6 object to an S4 object slot? R的predict.DArch示例提供了错误“试图从没有插槽的基本类(“ NULL”)对象中获取插槽“ data”” - R's predict.DArch example provides error “trying to get slot ”data“ from an object of a basic class (”NULL“) with no slots”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM