Sweave documents fail to compile under 2.03

2012-07-26 Thread Hobbs,Tom
Hello--

I have a mysterious problem.  All of the documents that I created including 
Sweave code using lyx 2.0 fail to compile when I use lyx 2.03. I am running lyx 
using Mac OS Lion.  I have several large documents with lots of Sweave code, so 
until I get this worked out, I won't able to upgrade.

Even the most simple Sweave example taken from the Sweave manual fails to run 
under my 2.03 installation, i.e.:

\SweaveOpts{echo=FALSE}   %turns off (FALSE) or on (TRUE) r code in output
\SweaveOpts{keep.source=TRUE}  %leaves comments in r code
\setkeys{Gin}{width=6 in}
Start
a=
data ( airquality )
names(airquality)[4]=Temp
k=kruskal.test ( Ozone ~ Month , data = airquality )
}
@

The italics are the chunk.

I would be grateful for any ideas about this problem.

My best,

Tom Hobbs







Re: Sweave documents fail to compile under 2.03

2012-07-26 Thread Yihui Xie
Please read section 4 of the manual and report more information:
https://github.com/downloads/yihui/lyx/sweave.pdf otherwise it is hard
to know what is exactly is the failure.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Thu, Jul 26, 2012 at 9:36 AM, Hobbs,Tom tom.ho...@colostate.edu wrote:
 Hello--

 I have a mysterious problem.  All of the documents that I created including
 Sweave code using lyx 2.0 fail to compile when I use lyx 2.03. I am running
 lyx using Mac OS Lion.  I have several large documents with lots of Sweave
 code, so until I get this worked out, I won't able to upgrade.

 Even the most simple Sweave example taken from the Sweave manual fails to
 run under my 2.03 installation, i.e.:

 \SweaveOpts{echo=FALSE}   %turns off (FALSE) or on (TRUE) r code in output
 \SweaveOpts{keep.source=TRUE}  %leaves comments in r code
 \setkeys{Gin}{width=6 in}
 Start
 a=
 data ( airquality )
 names(airquality)[4]=Temp
 k=kruskal.test ( Ozone ~ Month , data = airquality )
 }
 @

 The italics are the chunk.

 I would be grateful for any ideas about this problem.

 My best,

 Tom Hobbs







Re: Sweave documents fail to compile under 2.03

2012-07-26 Thread Yihui Xie
You did not read Section 4 carefully. I said in the manual that you
need to open View--View Messages, and check the messages there. A
simple error dialogue box saying An error occured while running
Rscript --verbose... is not helpful for diagnosis at all. BTW, your
document compiles fine under my system (LyX 2.0.4, Ubuntu).

To JMarc: I keep on forgetting a feature request about this problem
and I'm wondering if you could do it. When an error occurs with the
Sweave/knitr module, is it possible for LyX to catch the *real* error
message in R and show it in the error dialogue box instead of just
showing the very vague message An error occured while running Rscript
--verbose...? R errors are written to stderr, so in theory it should
be possible. Thanks!

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA

[...] reply omitted [...]


Re: Sweave documents fail to compile under 2.03

2012-07-26 Thread Yihui Xie
Oh, that is far in the opposite direction now -- too much debug
information :) You do not need to turn on debug messages; normal
messages are enough.

The problem comes from:

  Rscript --verbose --no-save --no-restore /Applications/LyX
2.app/Contents/Resources/scripts/lyxsweave.R

becomes

  '/Library/Frameworks/R.framework/Versions/2.13/Resources/bin/R
--slave --no-restore --no-save --no-restore --file=/Applications/LyX
2.app/Contents/Resources/scripts/lyxsweave.R

I do not know why R removed the quotes around the --file argument, but
FWIW, can you upgrade R to the latest version before you proceed? Also
update LyX if you can. Both LyX and R are old in your system.

The other thing is to make sure you did not hack at the Sweave module
by yourself; check the preferences file in your LyX User directory
(should not contain anything about Sweave there).

I do not use Mac OS, so it is difficult for me to reproduce the problem.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Thu, Jul 26, 2012 at 10:40 AM, Hobbs,Tom tom.ho...@colostate.edu wrote:
 Sorry--I thought the message I sent was the one you needed.  I set all of
 the debug messages to Yes and it appears that this is the one causing
 problems:

 08:34:14.849: Fatal error: cannot open file '/Applications/LyX': No such
 file or directory

 There is a file in my /Applications directory for LyX 2.app

 I included the full message list below.

 I have done the Reconfigure and the problem remains.

 Thanks very much for your help.

 Tom


Sweave documents fail to compile under 2.03

2012-07-26 Thread Hobbs,Tom
Hello--

I have a mysterious problem.  All of the documents that I created including 
Sweave code using lyx 2.0 fail to compile when I use lyx 2.03. I am running lyx 
using Mac OS Lion.  I have several large documents with lots of Sweave code, so 
until I get this worked out, I won't able to upgrade.

Even the most simple Sweave example taken from the Sweave manual fails to run 
under my 2.03 installation, i.e.:

\SweaveOpts{echo=FALSE}   %turns off (FALSE) or on (TRUE) r code in output
\SweaveOpts{keep.source=TRUE}  %leaves comments in r code
\setkeys{Gin}{width=6 in}
Start
a=
data ( airquality )
names(airquality)[4]=Temp
k=kruskal.test ( Ozone ~ Month , data = airquality )
}
@

The italics are the chunk.

I would be grateful for any ideas about this problem.

My best,

Tom Hobbs







Re: Sweave documents fail to compile under 2.03

2012-07-26 Thread Yihui Xie
Please read section 4 of the manual and report more information:
https://github.com/downloads/yihui/lyx/sweave.pdf otherwise it is hard
to know what is exactly is the failure.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Thu, Jul 26, 2012 at 9:36 AM, Hobbs,Tom tom.ho...@colostate.edu wrote:
 Hello--

 I have a mysterious problem.  All of the documents that I created including
 Sweave code using lyx 2.0 fail to compile when I use lyx 2.03. I am running
 lyx using Mac OS Lion.  I have several large documents with lots of Sweave
 code, so until I get this worked out, I won't able to upgrade.

 Even the most simple Sweave example taken from the Sweave manual fails to
 run under my 2.03 installation, i.e.:

 \SweaveOpts{echo=FALSE}   %turns off (FALSE) or on (TRUE) r code in output
 \SweaveOpts{keep.source=TRUE}  %leaves comments in r code
 \setkeys{Gin}{width=6 in}
 Start
 a=
 data ( airquality )
 names(airquality)[4]=Temp
 k=kruskal.test ( Ozone ~ Month , data = airquality )
 }
 @

 The italics are the chunk.

 I would be grateful for any ideas about this problem.

 My best,

 Tom Hobbs







Re: Sweave documents fail to compile under 2.03

2012-07-26 Thread Yihui Xie
You did not read Section 4 carefully. I said in the manual that you
need to open View--View Messages, and check the messages there. A
simple error dialogue box saying An error occured while running
Rscript --verbose... is not helpful for diagnosis at all. BTW, your
document compiles fine under my system (LyX 2.0.4, Ubuntu).

To JMarc: I keep on forgetting a feature request about this problem
and I'm wondering if you could do it. When an error occurs with the
Sweave/knitr module, is it possible for LyX to catch the *real* error
message in R and show it in the error dialogue box instead of just
showing the very vague message An error occured while running Rscript
--verbose...? R errors are written to stderr, so in theory it should
be possible. Thanks!

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA

[...] reply omitted [...]


Re: Sweave documents fail to compile under 2.03

2012-07-26 Thread Yihui Xie
Oh, that is far in the opposite direction now -- too much debug
information :) You do not need to turn on debug messages; normal
messages are enough.

The problem comes from:

  Rscript --verbose --no-save --no-restore /Applications/LyX
2.app/Contents/Resources/scripts/lyxsweave.R

becomes

  '/Library/Frameworks/R.framework/Versions/2.13/Resources/bin/R
--slave --no-restore --no-save --no-restore --file=/Applications/LyX
2.app/Contents/Resources/scripts/lyxsweave.R

I do not know why R removed the quotes around the --file argument, but
FWIW, can you upgrade R to the latest version before you proceed? Also
update LyX if you can. Both LyX and R are old in your system.

The other thing is to make sure you did not hack at the Sweave module
by yourself; check the preferences file in your LyX User directory
(should not contain anything about Sweave there).

I do not use Mac OS, so it is difficult for me to reproduce the problem.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Thu, Jul 26, 2012 at 10:40 AM, Hobbs,Tom tom.ho...@colostate.edu wrote:
 Sorry--I thought the message I sent was the one you needed.  I set all of
 the debug messages to Yes and it appears that this is the one causing
 problems:

 08:34:14.849: Fatal error: cannot open file '/Applications/LyX': No such
 file or directory

 There is a file in my /Applications directory for LyX 2.app

 I included the full message list below.

 I have done the Reconfigure and the problem remains.

 Thanks very much for your help.

 Tom


Sweave documents fail to compile under 2.03

2012-07-26 Thread Hobbs,Tom
Hello--

I have a mysterious problem.  All of the documents that I created including 
Sweave code using lyx 2.0 fail to compile when I use lyx 2.03. I am running lyx 
using Mac OS Lion.  I have several large documents with lots of Sweave code, so 
until I get this worked out, I won't able to upgrade.

Even the most simple Sweave example taken from the Sweave manual fails to run 
under my 2.03 installation, i.e.:

\SweaveOpts{echo=FALSE}   %turns off (FALSE) or on (TRUE) r code in output
\SweaveOpts{keep.source=TRUE}  %leaves comments in r code
\setkeys{Gin}{width=6 in}
Start
<>=
data ( airquality )
names(airquality)[4]="Temp"
k=kruskal.test ( Ozone ~ Month , data = airquality )
}
@

The italics are the chunk.

I would be grateful for any ideas about this problem.

My best,

Tom Hobbs







Re: Sweave documents fail to compile under 2.03

2012-07-26 Thread Yihui Xie
Please read section 4 of the manual and report more information:
https://github.com/downloads/yihui/lyx/sweave.pdf otherwise it is hard
to know what is exactly is the "failure".

Regards,
Yihui
--
Yihui Xie 
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Thu, Jul 26, 2012 at 9:36 AM, Hobbs,Tom  wrote:
> Hello--
>
> I have a mysterious problem.  All of the documents that I created including
> Sweave code using lyx 2.0 fail to compile when I use lyx 2.03. I am running
> lyx using Mac OS Lion.  I have several large documents with lots of Sweave
> code, so until I get this worked out, I won't able to upgrade.
>
> Even the most simple Sweave example taken from the Sweave manual fails to
> run under my 2.03 installation, i.e.:
>
> \SweaveOpts{echo=FALSE}   %turns off (FALSE) or on (TRUE) r code in output
> \SweaveOpts{keep.source=TRUE}  %leaves comments in r code
> \setkeys{Gin}{width=6 in}
> Start
> <>=
> data ( airquality )
> names(airquality)[4]="Temp"
> k=kruskal.test ( Ozone ~ Month , data = airquality )
> }
> @
>
> The italics are the chunk.
>
> I would be grateful for any ideas about this problem.
>
> My best,
>
> Tom Hobbs
>
>
>
>
>


Re: Sweave documents fail to compile under 2.03

2012-07-26 Thread Yihui Xie
You did not read Section 4 carefully. I said in the manual that you
need to open View-->View Messages, and check the messages there. A
simple error dialogue box saying "An error occured while running
Rscript --verbose..." is not helpful for diagnosis at all. BTW, your
document compiles fine under my system (LyX 2.0.4, Ubuntu).

To JMarc: I keep on forgetting a feature request about this problem
and I'm wondering if you could do it. When an error occurs with the
Sweave/knitr module, is it possible for LyX to catch the *real* error
message in R and show it in the error dialogue box instead of just
showing the very vague message "An error occured while running Rscript
--verbose..."? R errors are written to stderr, so in theory it should
be possible. Thanks!

Regards,
Yihui
--
Yihui Xie 
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA

[...] reply omitted [...]


Re: Sweave documents fail to compile under 2.03

2012-07-26 Thread Yihui Xie
Oh, that is far in the opposite direction now -- too much debug
information :) You do not need to turn on debug messages; normal
messages are enough.

The problem comes from:

  Rscript --verbose --no-save --no-restore "/Applications/LyX
2.app/Contents/Resources/scripts/lyxsweave.R"

becomes

  '/Library/Frameworks/R.framework/Versions/2.13/Resources/bin/R
--slave --no-restore --no-save --no-restore --file=/Applications/LyX
2.app/Contents/Resources/scripts/lyxsweave.R

I do not know why R removed the quotes around the --file argument, but
FWIW, can you upgrade R to the latest version before you proceed? Also
update LyX if you can. Both LyX and R are old in your system.

The other thing is to make sure you did not hack at the Sweave module
by yourself; check the preferences file in your LyX User directory
(should not contain anything about Sweave there).

I do not use Mac OS, so it is difficult for me to reproduce the problem.

Regards,
Yihui
--
Yihui Xie 
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Thu, Jul 26, 2012 at 10:40 AM, Hobbs,Tom  wrote:
> Sorry--I thought the message I sent was the one you needed.  I set all of
> the debug messages to Yes and it appears that this is the one causing
> problems:
>
> 08:34:14.849: Fatal error: cannot open file '/Applications/LyX': No such
> file or directory
>
> There is a file in my /Applications directory for LyX 2.app
>
> I included the full message list below.
>
> I have done the Reconfigure and the problem remains.
>
> Thanks very much for your help.
>
> Tom