[R] "Negative length vectors are not allowed" error
Kim C.
minorthreatx at hotmail.com
Tue Jan 20 10:03:25 CET 2015
Hi all, I have a question concerning an error that occurs when using the inspect() function on a set of rules made by the apriori function from the arules package. I have a dataset with 12 million records. It contains some basic sales information (such as product, customer data). I want to use the apriori function from the arules package on it: ruleset <- apriori(sales, parameter=list(support=0.0005, confidence=0.1, minlen=2))It gives me 780379 rules. I want to have that much rules on purpose, so hence the parameters being so low (I guess you can reproduce this problem with any large dataset and low settings for support and confidence). But then I want to check out the rules with inspect. It has a subset because I'm only interested in rules with the attribute Product in the rhs. inspect(subset(ruleset, subset=rhs %pin% "Product="))Then this error occurs: Error in inspect(subset(sales3ruleset, subset = rhs %pin% "Product=")) :
error in evaluating the argument 'x' in selecting a method for function 'inspect': Error in .Call("R_or_ngCMatrix", x at data, y at data, PACKAGE = "arules") :
negative length vectors are not allowedI looked around and apparently that part about "negative length vectors are not allowed" means that you want to create a vector that is larger than 2^31. How can you get around this limit? Or how can I make the inspectfunction work in this case?Thanks in advance!Kim
[[alternative HTML version deleted]]
More information about the R-help
mailing list