mhahsler / arules

Mining Association Rules and Frequent Itemsets with R
http://mhahsler.github.io/arules
GNU General Public License v3.0
194 stars 42 forks source link

Using base::write when called arules::write error #46

Closed zx8754 closed 6 years ago

zx8754 commented 6 years ago

Maybe better error/warning output? See relevant post at SO:

https://stackoverflow.com/q/53185553/680068

I am guessing OP is passing a data.frame to arules::write, and arules is using base::write as input is not "transactions", maybe check input?

mhahsler commented 6 years ago

Thanks for the report. Unfortunately, arules cannot check the input and produce an error message since the R S4 method dispatching procedure directly calls the appropriate method (in the case of a data.frame it calls directly write in base). The reason why you see that arules replaces the base write function is that in base write is not generic and arules just adds a generic function so a method for transactions can be added.