当.Rmd文件被编入html时,乳胶命令被完全忽略。逐项,引号,甚至文本格式化disappers,以及文本。当编译到.pdf \ chapter时,声明为未定义的控制序列,并且暂停执行。
---
output:
html_document:
fig_caption: yes
keep_md: yes
theme: cerulean
toc: yes
pdf_document:
fig_caption: yes
keep_tex: yes
toc: yes
---
\chapter{{Efficient R Coding}}
\section{Benchmarking}
Donald Knuth\sidenote{See \url{http://en.wikipedia.org/wiki/Donald_Knuth}} made the following statement on optimization:
\begin{quote}
\textit{"We should forget about small efficiencies, say about 97\% of the time: premature optimization is the root of all evil."}
\end{quote}
\noindent So before we rush headlong into optimising our R code, we will spend some time determining when it is worthwhile optimising. In this chapter, we will look at benchmarking. In computing, a benchmark is obtained by running a set of programs in order to assess their relative performance.
\section{Simple benchmarks}
To construct a benchmark we typically use the following steps
\begin{enumerate}
\item Construct a function (or set of functions) around the feature we want to
benchmark. This function usually has an argument that allows us to vary the
complexity of the object. For example, a parameter \texttt{n} that alters the data
这是......
忽略枚举环境。章节和章节标题也被忽略。如何使pandoc渲染大括号中的内容?