简体   繁体   中英

Unknown Item Label in R in Apriori

I am trying to filter rules which contain a certain category of item in the LHS, stored the items belonging to that category in the form of a vector and using this vector with subset to filter all the rules.

The error I am getting is "table contains an unknown item label".

Here's a snapshot of the code below:

top500vec is the vector which contains all the items of the same category,interested at looking for rules with these items on the LHS side

在此处输入图像描述

BY just looking at the error, it seems like top500vec contains item labels that are not defined in top500onlyrules . Check itemLabels(top500onlyrules) and make sure that top500vec only contains values that are valid item labels.

You should always post questions with reproducible examples. See: How to make a great R reproducible example

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM