无法运行knitr来生成pdf输出文件

时间:2013-01-24 18:41:24

标签: r knitr

我有这样的文件:

test.rnw

\documentclass[letter,10pt]{article}

\usepackage{amsmath}
\usepackage{amscd}

\usepackage{ifthen}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\usepackage[top=1.0in, bottom=1.0in, left=0.75in, right=0.75in]{geometry}


\begin{document}
\title{Top areas of focus for \\ This is a test}
\author{ test }
\maketitle
\pagebreak
\tableofcontents
\pagebreak

\section{Introduction}
this is a test document

\end{document}

我正在尝试手动运行knitr agaist并生成这样的pdf文件:

 knit2pdf("test.rnw", "test.pdf", compiler="texi2pdf")

我收到错误:

running command '"G:\latex\latex\miktex\bin\x64\texi2dvi.exe" --quiet --pdf "test.pdf"  -I "G:/R/R-2.15.2/share/texmf/tex/latex" -I "G:/R/R-2.15.2/share/texmf/bibtex/bst"' had status 1 

我对knitr很新,有人能告诉我我做错了什么吗?基本上我想组合一个.rnw文件并将其输出到pdf文件。

0 个答案:

没有答案