My last two questions were just embarrassing, but I feel confident that this one is the real deal. My system is a new install, so versions are current except for OS: Windows 7 SP1, R-3.0.1, Lyx 2.0.6, knitr 1.2, gdata 2.12.0.2.
First, let me note that gdata works correctly in RGui. Now, here's the doc I'm trying to compile:
And here's the output.
The gdata package also loads successfully in Rscript called from the command line. I used LyX to export an .Rnw file, which knits successfully from RGui and from a script passed to Rscript from the command line.
I had a similar (or possibly the same, I cannot swear to the identity of the error message) difficulty when I first started using the computer. That time it was due to Windows 7 User Account Controls, and was solved when I figured out how to automatically run R as an administrator (with no click-through -- sweet). So I tried removing the read-only attribute and all security restrictions on anything that might be involved -- the R folder, LyX folder, my package folder, MikTeX. No luck.
What next?
ETA: As near as I can tell, no R script called from LyX can load the gdata package. I altered the file converter to write stdout and stderr to file, which yielded the same error message seen above in the screenshot, but preceded by this:
Can't locate Data/Dumper.pm in @INC (@INC contains: C:/Users/cyanofsky/Documents/R/win-library/3.0/gdata/perl C:/Program Files (x86)/MiKTeX 2.9/miktex/lib .) at C:/Users/cyanofsky/Documents/R/win-library/3.0/gdata/perl/module_tools.pl line 11.
BEGIN failed--compilation aborted at C:/Users/cyanofsky/Documents/R/win-library/3.0/gdata/perl/module_tools.pl line 11.
Compilation failed in require at C:/Users/cyanofsky/Documents/R/win-library/3.0/gdata/perl/supportedFormats.pl line 9.
running 'C:\Program Files\R\R-3.0.1\bin\x64\Rterm.exe --slave --no-restore --no-save --no-restore --file=C:/Program Files (x86)/LyX 2.0/Resources/scripts/lyxknitr.R --args C:/Users/cyanofsky/AppData/Local/Temp/lyx_tmpdir.Hp8008/lyx_tmpbuf3/xxxxxxxxx.Rnw C:/Users/cyanofsky/AppData/Local/Temp/lyx_tmpdir.Hp8008/lyx_tmpbuf3/xxxxxxxx.tex ISO-8859-15'
ETA: A search for Data/Dumper pulled up this:
http://help.directadmin.com/item.php?id=189
I verified that my install of Perl64 has the Data module; it's in C:\Perl64\lib. So this is a case where some path variable somewhere is misconfigured. It's not LyX's path prefix variable; no, no, that would be too easy.
Per Yihui's answer:
From within the GUI (in this case, RStudio):
> strsplit(Sys.getenv('PATH'), ';')
[[1]]
[1] "C:\\Program Files\\R\\R-3.0.1\\bin\\x64"
[2] "C:\\Program Files\\R\\R-3.0.1\\bin\\x64"
[3] "C:\\Perl64\\site\\bin"
[4] "C:\\Perl64\\bin"
[5] "c:\\Rtools\\bin"
[6] "c:\\Rtools\\gcc-4.6.3\\bin"
[7] "c:\\Program Files (x86)\\AMD APP\\bin\\x86_64"
[8] "c:\\Program Files (x86)\\AMD APP\\bin\\x86"
[9] "c:\\Program Files (x86)\\Intel\\iCLS Client\\"
[10] "c:\\Program Files\\Intel\\iCLS Client\\"
[11] "C:\\Windows\\system32"
[12] "C:\\Windows"
[13] "C:\\Windows\\System32\\Wbem"
[14] "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\"
[15] "c:\\Program Files (x86)\\ATI Technologies\\ATI.ACE\\Core-Static"
[16] ""
[17] "C:\\Program Files\\Intel\\WiFi\\bin\\"
[18] "C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\"
[19] "C:\\Program Files (x86)\\Intel\\OpenCL SDK\\3.0\\bin\\x86"
[20] "C:\\Program Files (x86)\\Intel\\OpenCL SDK\\3.0\\bin\\x64"
[21] "C:\\Program Files (x86)\\MiKTeX 2.9\\miktex\\bin\\"
> Sys.which('perl')
perl
"C:\\Perl64\\bin\\perl.exe"
Here's from within the call to Rscript:
> load("~/lyxknitrpaths.RData")
> syspath
[[1]]
[1] "C:\\Program Files\\R\\R-3.0.1\\bin\\x644"
[2] "LyXDir\\bin"
[3] "$LyXDir\\Python"
[4] "$LyXDir\\Python\\Lib"
[5] "$LyXDir\\imagemagick"
[6] "C:\\Program Files (x86)\\MiKTeX 2.9\\miktex\\bin"
[7] "C:\\Program Files (x86)\\LyX 2.0\\ghostscript\\bin"
[8] "C:\\Perl64\\lib"
[9] "C:\\Perl64"
[10] "C:\\Program Files (x86)\\LyX 2.0\\\\Python"
[11] "C:\\Program Files (x86)\\LyX 2.0\\\\Python\\Lib"
[12] "C:\\Program Files (x86)\\LyX 2.0\\\\imagemagick"
[13] "C:\\Program Files (x86)\\LyX 2.0\\\\bin"
[14] "C:\\Program Files (x86)\\LyX 2.0\\bin\\"
[15] "C:\\Program Files\\R\\R-3.0.1\\bin\\x64"
[16] "C:\\Perl64\\site\\bin"
[17] "C:\\Perl64\\bin"
[18] "c:\\Rtools\\bin"
[19] "c:\\Rtools\\gcc-4.6.3\\bin"
[20] "c:\\Program Files (x86)\\AMD APP\\bin\\x86_64"
[21] "c:\\Program Files (x86)\\AMD APP\\bin\\x86"
[22] "c:\\Program Files (x86)\\Intel\\iCLS Client\\"
[23] "c:\\Program Files\\Intel\\iCLS Client\\"
[24] "C:\\Windows\\System32"
[25] "C:\\Windows"
[26] "C:\\Windows\\System32\\wbem"
[27] "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\"
[28] "c:\\Program Files (x86)\\ATI Technologies\\ATI.ACE\\Core-Static"
[29] "C:\\Program Files\\Intel\\WiFi\\bin\\"
[30] "C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\"
[31] "C:\\Program Files (x86)\\Intel\\OpenCL SDK\\3.0\\bin\\x86"
[32] "C:\\Program Files (x86)\\Intel\\OpenCL SDK\\3.0\\bin\\x64"
[33] "C:\\Program Files (x86)\\MiKTeX 2.9\\miktex\\bin\\"
> perlpath
perl
"C:\\PROGRA~2\\MIKTEX~1.9\\miktex\\bin\\perl.exe"