R markdown批量生成报告

本文介绍如何利用R Markdown的render函数批量生成报告。通过链接提供的资源,读者可以了解到R Markdown的详细用法和批量渲染报告的方法,适用于自动化生成多份定制化的分析报告。
摘要由CSDN通过智能技术生成
妈蛋,搞到现在才解决

---
title: "main-word"
output: word_document
---

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.

When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

```{r, echo=FALSE}
library(rmarkdown)
setwd("C:\\Users\\qzhao\\Documents\\20160418homework")
data<-read.csv("data.csv",stringsAsFactors = FALSE)
for (i in 1:length(unique(data[,2])))
{
  name=unique(data[,2])[i]
  subdata<-subset(data,data[,2]==name)
  #outfile<-paste(name,".docx",sep="")
  file=paste("xxx", i, ".docx",sep="")
  rend
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值