首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Lyx /针织机误差

Lyx /针织机误差
EN

Stack Overflow用户
提问于 2013-07-26 21:12:39
回答 1查看 1.5K关注 0票数 2

我一直收到这个错误;Rscript --verbose --no-save --no-restore --我也看到这里的其他人也得到了它,所以我不希望它是重复的。

我只是一个普通的乔,想要学习一些R,并希望能够报告,以莱克斯/针织品,因此,我不太懂乳胶或编码的一般。

话虽如此,我将尽我最大的能力来描述这个问题。

我能够编译一些在针织品文件夹中提供的演示,还有一些我自己做的简单的演示。但是由于某种原因,上面提到的错误出现了,文档被销毁了--这意味着,即使我删除了所有代码,我也无法编译它。

这个错误似乎几乎是随机出现的,在图片中你可以看到错误。第一个测试进行得很好--尽管它出现在我使用hist()命令时--这一次,它出现在我试图获得工作目录时,即我能够做到没有错误。

我不确定这是否是我的错误,或者是在Knitr/Lyx中的一个错误--希望你能帮助我确定它是哪一个。

!!编辑;Lyx-日志应请求。

代码语言:javascript
复制
22:47:42.732: Previewing ...
22:47:42.739: (buffer-view: Ctrl+R)
22:47:42.779: Rscript --verbose --no-save --no-restore "C:/Program Files (x86)/LyX 2.0/Resources/scripts/lyxknitr.R" "C:/Users/Toddi/AppData/Local/Temp/lyx_tmpdir.Hp4668/lyx_tmpbuf2/""newfile1.Rnw" "C:/Users/Toddi/AppData/Local/Temp/lyx_tmpdir.Hp4668/lyx_tmpbuf2/""newfile1.tex" ISO-8859-15 "C:/Users/Toddi/Documents/"
Running: Rscript --verbose --no-save --no-restore "C:/Program Files (x86)/LyX 2.0/Resources/scripts/lyxknitr.R" "C:/Users/Toddi/AppData/Local/Temp/lyx_tmpdir.Hp4668/lyx_tmpbuf2/""newfile1.Rnw" "C:/Users/Toddi/AppData/Local/Temp/lyx_tmpdir.Hp4668/lyx_tmpbuf2/""newfile1.tex" ISO-8859-15 "C:/Users/Toddi/Documents/"
22:47:43.408: 
  |                                                                       
  |                                                                 |   0%
  |                                             
22:47:43.409:                           
  |......................                                           |  33%
22:47:43.409:   ordinary text without R code
22:47:43.409: 
22:47:43.409: 
  |                                                                       
  |...........................................                      |  67%
22:47:43.409: label: test
22:47:43.410: running
22:47:43.410:   'C:\PROGRA~1\R\R-30~1.1\bin\i386\Rterm.exe --slave --no-restore --no-save --no-restore --file=C:/Program Files (x86)/LyX 2.0/Resources/scripts/lyxknitr.R --args C:/Users/Toddi/AppData/Local/Temp/ly
22:47:43.410: x_tmpdir.Hp4668/lyx_tmpbuf2/newfile1.Rnw C:/Users/Toddi/AppData/Local/Temp/lyx_tmpdir.Hp4668/lyx_tmpbuf2/newfile1.tex ISO-8859-15'
22:47:43.411: 
22:47:43.411: 
22:47:43.411: 
22:47:43.411: processing file: C:/Users/Toddi/AppData/Local/Temp/lyx_tmpdir.Hp4668/lyx_tmpbuf2/newfile1.Rnw
22:47:43.456: 
22:47:43.457: Advarsel i block_exec(params) :
22:47:43.457:   failed to tidy R code in chunk <test>
22:47:43.459: reason: Error in base::parse(text = text, srcfile = NULL) : 3:1: unexpected '@'
22:47:43.459: 2: hist(q)
22:47:43.459: 3: @
22:47:43.460:   ^
22:47:43.460: 
22:47:43.460: Quitting from lines 11-15 (C:/Users/Toddi/AppData/Local/Temp/lyx_tmpdir.Hp4668/lyx_tmpbuf2/newfile1.Rnw) 
22:47:43.461: Fejl i parse(text = x, srcfile = src) : <text>:3:1: unexpected '@'
22:47:43.461: 2: hist(q)
22:47:43.461: 3: @
22:47:43.461:   ^
22:47:43.461: Calls: knit ... evaluate -> parse_all -> parse_all.character -> parse
22:47:43.461: Execution halted
..\..\..\src\support\Systemcall.cpp (273): Systemcall: 'Rscript --verbose --no-save --no-restore "C:/Program Files (x86)/LyX 2.0/Resources/scripts/lyxknitr.R" "C:/Users/Toddi/AppData/Local/Temp/lyx_tmpdir.Hp4668/lyx_tmpbuf2/""newfile1.Rnw" "C:/Users/Toddi/AppData/Local/Temp/lyx_tmpdir.Hp4668/lyx_tmpbuf2/""newfile1.tex" ISO-8859-15 "C:/Users/Toddi/Documents/"' finished with exit code 1
Error: Cannot convert file
----------------------------------------
An error occurred while running:
Rscript --verbose --no-save --no-restore "C:/Program Files (x86)/LyX
2.0/Resources/scripts/lyxknitr.R"
"C:/Users/Toddi/AppData/Local/Temp/lyx_tmpdir.Hp4668/lyx_tmpbuf2/""newfile1....
22:51:00.499: Automatic save done.
22:51:51.362: Error while previewing format: pdf2

编辑2;

你是说这个吗?

代码语言:javascript
复制
% Preview source code for paragraph 0


<<test>>=
q <- rnorm(100)
hist(q)
@<<test2>>=
getwd()
@

我在@<<test>>=之间添加了一条线,现在起作用了。但我想我已经看到在代码位之间有文本的情况下失败了。我会小心这一点,并试图看看源代码在未来,谢谢您的时间!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-07-27 02:13:28

我猜想,在第一个@之后,您可能需要一个新的行。我记得在某些情况下,LyX没有在邪恶的红色文本之后添加新行,这会给knitr带来问题。我不能确定LyX什么时候会这么做,因为我很少使用Windows,而且我也不能在Ubuntu/LyX2.0.6下重现这个问题。

若要验证,请从View-->View source打开源代码面板,并查看LaTeX源代码中是否有@后面的新行。

打开源面板和消息面板总是一个好主意,以确保您看到LyX背后的一切,并知道什么是真正的错误。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17891108

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档