On Sat, 11 Jul 2015, Liviu Andronic wrote:
Knitr seems to be picky about label names of figure chunks to be unique.
Check this. Also, to be safe, keep to one figure per chunk.
Liviu,
Yes, I read about naming lables; that's why knitr has the lp option for
label prefix. In my case, one lable is 'scatter plot group 1' and the other
is 'scatter plot group 2.' There is only one figure per chunk.
As for the log, I think some knitr messages aren't in the log per se, but
are displayed in the Messages pane. Inspect that for clues.
I didn't think of opening the message pane. Problems with the first figure
produced the LyX error window; these issues with the second figure do not
display that 2-window log message, only a fixed message that there's a
problem with the file.
Here's the final portion of the message pane:
14:09:01.216: label: unnamed-chunk-8
14:09:01.220: Quitting from lines 101-102
(/tmp/lyx_tmpdir.iWjxUWQ26141/lyx_tmpbuf5/test.Rnw)
14:09:01.221: Error in parse(text = x, srcfile = src) :
14:09:01.224: <text>:2:0: unexpected end of input
14:09:01.225: 1: xyplot(value ~ sampdate | variable, data=carlin.2.melt, rm.na
= T, ylab = 'Measured Value', xlab = 'Date'
14:09:01.227: ^
14:09:01.229: Calls: knit ... <Anonymous> -> parse_all -> parse_all.character
-> parse
14:09:01.231:
14:09:01.233: Execution halted
Systemcall.cpp (292): Systemcall: 'Rscript --verbose --no-save --no-restore
"/usr/share/lyx/scripts/lyxknitr.R"
"/tmp/lyx_tmpdir.iWjxUWQ26141/lyx_tmpbuf5/""test.Rnw"
"/tmp/lyx_tmpdir.iWjxUWQ26141/lyx_tmpbuf5/""test.tex" ISO-8859-15
"/home/rshepard/documents/white-papers/water-chem-anal/"' finished with exit
code 1
Error: Cannot convert file
----------------------------------------
An error occurred while running:
Rscript --verbose --no-save --no-restore "/usr/share/lyx/scripts/lyxknitr.R"
"/tmp/lyx_tmpdir.iWjxUWQ26141/lyx_tmpbuf5/""test.Rnw"
"/tmp/lyx_tmpdir.iWjxUWQ26141/lyx_tmpbuf5/""test.tex" ISO-8859-15
"/home/rshepard/documents/white-papers/water-chem-anal/"
14:09:07.510: Error while exporting format: PDF (pdflatex)
Note line 227: the caret is under the 'x' in xyplot.
Should I move this thread to the R-help list or stackexchange?
Thanks,
Rich