is.subset 在 R 中不起作用吗?
Is is.subset not working in R?
require(arules)
Groceries <- read.transactions("C:/Users/IBM_ADMIN/Desktopgroceries.csv",sep=",")
m1 <- apriori(Groceries,parameter=list(support=0.007,confidence=0.25,minlen=2))
subset.matrix <- is.subset(m1, m1)
#这条线不行
这会产生以下错误消息:
Error in match(x, table, nomatch = 0L) :
'match' requires vector arguments
请帮帮我。
apriori
returns 规则对象,不是向量:
data("Adult")
## Mine association rules.
rules <- apriori(Adult,
parameter = list(supp = 0.5, conf = 0.9, target = "rules"))
class(rules)
# [1] "rules"
如果您想比较规则列表,您需要将此对象转换为 data.frame,例如:
rules.df <- as(rules, "data.frame")
is.subset(rules.df$rules, rules.df$rules)
require(arules)
Groceries <- read.transactions("C:/Users/IBM_ADMIN/Desktopgroceries.csv",sep=",")
m1 <- apriori(Groceries,parameter=list(support=0.007,confidence=0.25,minlen=2))
subset.matrix <- is.subset(m1, m1)
#这条线不行
这会产生以下错误消息:
Error in match(x, table, nomatch = 0L) :
'match' requires vector arguments
请帮帮我。
apriori
returns 规则对象,不是向量:
data("Adult")
## Mine association rules.
rules <- apriori(Adult,
parameter = list(supp = 0.5, conf = 0.9, target = "rules"))
class(rules)
# [1] "rules"
如果您想比较规则列表,您需要将此对象转换为 data.frame,例如:
rules.df <- as(rules, "data.frame")
is.subset(rules.df$rules, rules.df$rules)