我正在尝试创建一个类似于R Markdown的文档。在一个名为 app 的向量中,我将有几个应用程序,将对其进行遍历,并创建一个 PDF 文件。
---
title: "Java Based Apps"
date: "January 13, 2017"
output:
pdf_document:
number_sections: yes
toc: true
highlight: zenburn
fig_width: 7
fig_height: 6
fig_caption: true
tables: yes
keep_tex: true
fontsize: 12
---
```{r message=FALSE, results = 'asis', echo=FALSE, warning=FALSE}
app<-c("Sample APP")
for (i in app){
cat(paste("## ", "- Correlation Analysis between performance KPI's"))
cat("\n")
m<-corrplot(M, method="number")
cat(paste("## ", "- JVM %CPU Usage"))
cat("\n")
print(ggplot(data, aes(Date, JVM_CPU, group=JVM))+geom_point()+geom_smooth(method="lm",se=F)+theme_bw()+
ggtitle(paste(i, " - JVM %CPU Usage/15 Minute Interval"))+facet_wrap(~JVM, scale="free"))
cat(paste("## ", "- JVM Heap Usage"))
cat("\n")
print(ggplot(data, aes(Date, JVM_Mem, group=JVM))+geom_point()+geom_smooth(method="lm",se=F)+theme_bw()+
ggtitle(paste(i, " - JVM Memory Usage/15 Minute Interval"))+facet_wrap(~JVM, scale="free")+ylab("Memory Usage/MG"))
}
```
输出需要像这样:
Sample App
- Correlation Analysis between performance KPI's
- JVM %CPU Usage
- JVM Heap Usage
等等
我看到这个:
Sample App
- Correlation Analysis between performance KPI's
但其他的并没有被创建为子部分。你有什么想法我在这里做错了吗?