以下是我的数据集的片段:
共有26列和约5000行,总有一些NA值
r<-apriori(data,parameter = list(supp=0.9,conf=0.6,minlen=2))
lhs rhs support confidence lift count
[1] {Product.13=} => {Product.14=} 0.9061887 1.0000000 1.077855 5081
[2] {Product.14=} => {Product.13=} 0.9061887 0.9767397 1.077855 5081
[3] {Product.13=} => {Product.15=} 0.9061887 1.0000000 1.059124 5081
[4] {Product.15=} => {Product.13=} 0.9061887 0.9597658 1.059124 5081
[5] {Product.13=} => {Product.16=} 0.9061887 1.0000000 1.044718 5081
所需的输出格式
{Cranberries} => {Strawberries}
谢谢