【发布时间】:2016-06-14 21:11:33
【问题描述】:
我想运行一个脚本并制作许多情节,但只有在最后情节然后才降价
所以我试图做的是将许多地块保存为地块列表,但不将它们发布到降价。
第二步是通过列表并绘制三分之一的地块,但由于某种原因,我只得到最后一个地块。
#+ setup, include=FALSE
library(knitr)
opts_chunk$set(fig.path = 'figure/silk-', fig.width = 10, fig.height = 10)
#' Make a list of plots.
#'
#/* do not show in Markdown
index = 1
plots<-list()
for (let in letters)
{
plot(c(index:100))
assign(let,recordPlot())
plot.new()
plots[index]<-(let)
index=index+1
}
#*/go through list of plots and plot then to markdown file
for (p in seq(from = 1, to = length(plots), by =3))
{
print(get(plots[[p]]))
}
【问题讨论】:
标签: r plot knitr r-markdown