3

I understand there is another question already for this...I am new and thus unable to comment on it. Additionally, I don't believe the question was answered.

Anyway I am running arules pkg: aprori. I am using the following params:

testbasket_rules <- apriori(testbasket_txn, parameter = list(sup = 0.1, conf = 0.5, maxlen = 100))

I get 2 rules back, but also the error:

Error in length(obj) : Method length not implemented for class rules...

So I can't even inspect the 2 rules that were generated

I can mess around with the sup & conf and get more or less rules back, but always get the length error.

I checked my max basket length and it is not more than 100 and you can see that i set my maxlen to 100. Does anybody have any ideas how to resolve?

Phil
  • 2,797
  • 1
  • 24
  • 30
  • Can you include a sample or a subset of your data in a format that's easy for others on here to get into their R sessions, and also provide us with the code you are attempting and the errors you are getting so we have a reproducible context for helping you solve the problem? Thanks :) – mysteRious Apr 11 '18 at 17:57

1 Answers1

1

I shut down my computer when I went home, upon restart the next day and opening up R and trying the script again I got desired output. Not sure what exactly was causing the issues...perhaps something with packages not loading correctly. But issue seems to be resolved now