forked from fawda123/pan_flow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pan_flow.vrb
24 lines (21 loc) · 938 Bytes
/
pan_flow.vrb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
\frametitle {Steps 4 - 6}\small
After creating supporting documents in Project directory, final steps are completed by running `master.r'
\begin{itemize}
\item Step 4 - xls file imported using \texttt{gdata} package, implemented in `report.Rmd'
\item Step 5 - HTML document created by converting `report.Rmd' with \texttt{knit2html} in `master.r'
\item Step 6 - HTML document converted to Word with Pandoc by invoking system command
\end{itemize}
\begin{block}{master.r}
\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlcom{# file to process}
\hlstd{name} \hlkwb{<-} \hlstr{"/my_data.xlsx"}
\hlcom{# rmd to html}
\hlkwd{knit2html}\hlstd{(}\hlstr{"report.Rmd"}\hlstd{)}
\hlcom{# pandoc conversion of html to word doc}
\hlkwd{system}\hlstd{(}\hlkwd{paste0}\hlstd{(}\hlstr{"pandoc -o report.docx report.html"}\hlstd{))}
\end{alltt}
\end{kframe}
\end{knitrout}
\end{block}