【问题标题】:How to plot titles of items on arules plot?如何在 arules 图上绘制项目的标题?
【发布时间】:2016-06-07 14:53:09
【问题描述】:

我有一个包含项目 ID 的交易列表retail.hi,我还有一个包含 ID 和标题的 info-df。

我想在情节上看到标题而不是 ID。 我该怎么做?

问题是我的 info-df 中不存在一些 id,对于它们,我想绘制 id 而不是标题。

我确实是这样绘制的:

plot(retail.hi, method = "graph", control = list(type = "items"))

【问题讨论】:

    标签: r list plot associations arules


    【解决方案1】:

    您可以替换标签栏中的项目标签

     itemInfo(retail.hi)
    

    您可能需要匹配您的 ID,然后执行以下操作:

     iteminfo(retail.hi)$labels <- your_new_labels
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-06-14
      • 2016-03-22
      • 1970-01-01
      • 2011-04-13
      • 1970-01-01
      • 2018-08-29
      相关资源
      最近更新 更多