I am experimenting with the apriori algorithm in the arules package.
This is what I've done: I loaded a view from SQL Server into R. Since that data is not in transactions form (to use in apriori), I had to convert it:
data <- sapply(orders, as.factor)
Then I entered the apriori function:
apriori(data, parameter = list (support=0.005, confidence=0.5))
I get this error:
Error in t(as(from, "ngCMatrix")) : error in evaluating the argument 'x' in selecting a method for function 't': Error in asMethod(object) : cannot coerce 'NA's to "nsparseMatrix"
I checked with a query and I don't even have any attribute that is NULL/NA.
I don't understand what the error means. Does someone know what the problem is and how to solve this?