PhilipJPK
PhilipJPK

Reputation: 1

(R) Error in cspade > summary(s1) : comparison (6) is possible only for atomic and list types

I try to execute the SPADE algorithm (arules and arulesSequences package) for sequential pattern mining.

If I run the code

library(Matrix)
library(arules)
library(arulesSequences)

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

s1 <- cspade(x, parameter = list(support = 0.4), control = list(verbose = TRUE))
cspade> summary(s1)

as it is specified in https://en.wikibooks.org/wiki/Data_Mining_Algorithms_In_R/Sequence_Mining/SPADE

I receive the following error:

Error in cspade > summary(s1) : 
   comparison (6) is possible only for atomic and list types

Small note: by downloading the packages the hole code will work for you because it uses example data.

Does somebody has an idea how to solve the error?

Best Regards, Philip

Upvotes: 0

Views: 42

Answers (1)

PhilipJPK
PhilipJPK

Reputation: 1

Ok I have found the solution. It was a simple mistake. Instead of

cspade> summary(s1)

I (now obviously) should have written:

summary(s1)

... a beginners mistake.

Upvotes: 0

Related Questions