Within a little script I wrote, I successfully call
library(arules)
trans <- as(data, "transactions")
Now I want to include this in a function in my R package. arules
is imported, and I call the arules functions using ::
. However, as
does not work. It gives me the above error message, which suggests that it does not know how to handle transactions
. And there is no as.transactions
, or similar in the arules
package that I could import.
This answer shows how to import an operator from a package. I assume there is something similar for my problem, I just don't know what to look for.
What do I have to do in order for as
to understand what transactions
are?