1

I get error in R when running the following method for CSPADE algorithm (finding association rules in transactions):

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)

  • 1
    This question is not clear as written. You should include a reproducible example. http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – polka Sep 07 '16 at 18:57
  • Not sure which part is not clear but let me elaborate a bit. The text file "zaki.txt" is part of the arulesSequences package so everyone who has installed that package, does have that data set. The first line of the code executes and creates a transaction object "x". the second line (cspade) gives that error, although I just copy-pasted the same code snippet from the cspade doc. – user6806092 Sep 07 '16 at 21:17

1 Answers1

1

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()