私はthis linkとthis linkを参照して、rスクリプトと出力をPDFドキュメントに変換しようとしました。私は単語(ファイル名/ディレクトリのための収容)で最初のリンクの単語の指示に従ったが、私はエラーメッセージが表示されます。knitrを使用したpdfへのマークダウン
> # Create Pdf files
> knit("TextMining.Rmd")
processing file: TextMining.Rmd
|......... | 14%
ordinary text without R code
|................... | 29%
label: setup (with options)
List of 1
$ include: logi FALSE
|............................ | 43%
ordinary text without R code
|..................................... | 57%
label: cars
|.............................................. | 71%
ordinary text without R code
|........................................................ | 86%
label: pressure (with options)
List of 1
$ echo: logi FALSE
|.................................................................| 100%
ordinary text without R code
output file: TextMining.md
[1] "TextMining.md"
> markdownToHTML('TextMining.md', 'TextMining.html', options=c("use_xhml"))
> system("pandoc -s TextMining.html -o TextMining.pdf")
pandoc.exe: Error producing PDF from TeX source.
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9)
pdflatex: The memory dump file could not be found.
pdflatex: Data: pdflatex.fmt
Warning message:
running command 'pandoc -s TextMining.html -o TextMining.pdf' had status 43
私はこの問題を解決できないようです。過去数年前、Rスクリプト自体にそのような参照を含めるのではなく、RMDファイルに自分のコードを入力させるコードが見つかりました。私はその後、出力を生成するために、その効果のためにニットPDFまたは何かをクリックします。私はそれが生成する出力を処理するより良い方法だと思います。私はそれをどうやって起こせるかを提案することもできますか?
EDIT:結果:
library(knitr); (f = system.file("examples", "knitr-minimal.Rnw", package = "knitr")); knit(f)
Warning message:
package ‘knitr’ was built under R version 3.2.5
[1] "C:/Users/XYZ/Documents/R/win-library/3.2/knitr/examples/knitr-minimal.Rnw"
processing file: C:/Users/XYZ/Documents/R/win-library/3.2/knitr/examples/knitr-minimal.Rnw
|......... | 14%
ordinary text without R code
|................... | 29%
label: setup (with options)
List of 2
$ include: logi FALSE
$ cache : logi FALSE
|............................ | 43%
ordinary text without R code
|..................................... | 57%
label: boring-random
|.............................................. | 71%
inline R code fragments
|........................................................ | 86%
label: boring-plots (with options)
List of 3
$ fig.width : num 4
$ fig.height: num 4
$ out.width : chr ".4\\linewidth"
|.................................................................| 100%
ordinary text without R code
output file: knitr-minimal.tex
[1] "knitr-minimal.tex"
編集2
library(tools);texi2pdf("knitr-minimal.tex")
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (MiKTeX 2.9 64-bit)
entering extended mode
(knitr-minimal.tex
LaTeX2e <2016/03/31> patch level 1
Babel <3.9r> and hyphenation patterns for 75 language(s) loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"))
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\trig.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg")
("C:\Program Files\MiKTeX 2.9\tex\latex\pdftex-def\pdftex.def"
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty")
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty"))))
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\color.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\color.cfg"))
("C:\Program Files\MiKTeX 2.9\tex\latex\framed\framed.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\base\alltt.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\mathpazo.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\base\fontenc.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\base\t1enc.def"))
("C:\Program Files\MiKTeX 2.9\tex\latex\geometry\geometry.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty")
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifvtex.sty")
("C:\Program Files\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\geometry\geometry.cfg"))
("C:\Program Files\MiKTeX 2.9\tex\latex\url\url.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\hyperref.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\hobsub-hyperref.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\hobsub-generic.sty"))
("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\auxhook.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\kvoptions.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\pd1enc.def")
("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\hyperref.cfg")
("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\puenc.def"))
Package hyperref Message: Driver (autodetected): hpdftex.
("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\hpdftex.def"
("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\rerunfilecheck.sty"))
("C:\Program Files\MiKTeX 2.9\tex\latex\upquote\upquote.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\base\textcomp.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\base\ts1enc.def")))
No file knitr-minimal.aux.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\ts1cmr.fd")
("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\t1pplx.fd")
("C:\Program Files\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
) ("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\epstopdf-base.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\grfext.sty"))
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
Package geometry Warning: The marginal notes overrun the paper.
Add 4.86812pt and more to the right margin.
*geometry* verbose mode - [ preamble ] result:
* driver: pdftex
* paper: <default>
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* modes:
* h-part:(L,W,R)=(71.13188pt, 472.03123pt, 71.13188pt)
* v-part:(T,H,B)=(71.13188pt, 652.70622pt, 71.13188pt)
* \paperwidth=614.295pt
* \paperheight=794.96999pt
* \textwidth=472.03123pt
* \textheight=652.70622pt
* \oddsidemargin=-1.1381pt
* \evensidemargin=-1.1381pt
* \topmargin=-38.1381pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=10.0pt
* \footskip=30.0pt
* \marginparwidth=65.0pt
* \marginparsep=11.0pt
* \columnsep=10.0pt
* \skip\footins=9.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\nameref.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\gettitlestring.sty"))
("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\ot1pplx.fd")
("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\omlzplm.fd")
Sorry, but C:\PROGRA~1\MIKTEX~1.9\miktex\bin\x64\pdflatex.exe did not succeed.
The log file hopefully contains the information to get MiKTeX going again:
C:/Users/XYZ/AppData/Local/MiKTeX/2.9/miktex/log/pdflatex.log
You may want to visit the MiKTeX project page, if you need help.
Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet, :
unable to run 'pdflatex' on 'knitr-minimal.tex'
In addition: Warning message:
running command '"pdflatex" -interaction=nonstopmode "knitr-minimal.tex"' had status 1
'library(knitr);の出力を投稿できますか。 (f = system.file( "examples"、 "knitr-minimal.Rnw"、package = "knitr")); knit(f) '。これは、 'pdflatex'がPATHに正しくインストールされているかどうかをテストします。私は最近、同様の発行者に直面しました。最後に、MikTexポータブルで私の問題を解決しました – OdeToMyFiddle
更新された説明を参照してください – Freewill
申し訳ありません、これは以前の 'ライブラリ(tools); texi2pdf(" knitr-minimal.tex ")' pdf変換 – OdeToMyFiddle