【问题标题】:R: enlarge a transactions plotR:放大交易图
【发布时间】:2015-10-12 20:03:10
【问题描述】:

您好,我需要这方面的帮助。当我放

我收到了这些错误。

但是,我正在尝试将它绘制在 knit html 文档上,我想要这样的东西:

我应该将什么作为参数传递给绘图函数???

【问题讨论】:

标签: r plot transactions data-mining arules


【解决方案1】:
library(arulesViz)
data("Groceries")
rules <- apriori(Groceries, parameter=list(support=0.001, confidence=0.5))

调整图形设备的高度

f <- function(height) { 
  pdf(tf <- tempfile(fileext = ".pdf"), height = height)  
  plot(rules, method="grouped") 
  dev.off() 
  shell.exec(tf) 
}
f(5)  # too small
f(10) # better height

或尝试使用交互式绘图

sel <- plot(rules, method="grouped", interactive=TRUE)

【讨论】:

  • 不错的功能+1,你也可以缩写标签,Groceries &lt;- arulesViz::abbreviate(Groceries)
  • 它不起作用,因为我试图在 knit html 文档上绘制它:(
  • @IvanG4Life 而且不可能在那里定义地块的高度?请编辑您的问题,并提供一个可重复的最小示例来说明您得到了什么。
  • @IvanG4Life 例如将```{r} 替换为```{r, fig.height=20}
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-10-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多