Hi Yihui, I did have the bin path of R in my PATH, but when I tried the command you showed me under command window, system says couldn't find it. I took out the string in PATH, it looks like this:
C:\Program Files\Rtools\bin; C:\Program Files\Rtools\MinGW\bin; C:\Program Files\Rtools\MinGW64\bin; C:\Program Files\MiKTeX 2.9\miktex\bin; ## ...some dirs ... ## %SystemRoot%\system32; %SystemRoot%; %SystemRoot%\System32\Wbem; %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\; ##... some dirs ... ## C:\Program Files\R\R-2.13.0\bin; (to save the space, I replace some directories with the ## ... some dirs ... ##) So I cut the last directory, the bin of my R, paste it in the very up front. Then I can use Rscript, then I reconfigure Lyx and everything is working now! I can see all 4 converters and I can compile the sweave.lyx file. I have no idea how the position (or it's something else) can affect the PATH variable, but mysteriously it just does! I guess this might also be the problem on my XP system, will try that out tomorrow. Thank you very much for your advice, have a good night. Best, Ziliang On Wed, Jul 13, 2011 at 11:18 PM, Yihui Xie <[email protected]> wrote: > So that is the problem. The 'View' button was disabled because the > converter associated with the Sweave module does not exist. > > I am not sure about the reason why these converters are not there. > JMarc should be more familiar with the configuration behind the scene. > I can give you steps to manually define these converters, but I do not > want to mess up with your LyX configurations. You may come back to me > if you really cannot solve the problem. > > BTW, are you sure the bin path of R is in your PATH? try this in a > command window (Start-->Run; cmd): > > Rscript --version > > Regards, > Yihui > -- > Yihui Xie <[email protected]> > Phone: 515-294-2465 Web: http://yihui.name > Department of Statistics, Iowa State University > 2215 Snedecor Hall, Ames, IA > > > > On Wed, Jul 13, 2011 at 9:03 PM, Z.L. Li <[email protected]> wrote: > > Hi Yihui, > > Thanks for your help. I just checked the converter part, surprisingly > there > > is 0 converter from Sweave to LaTeX ! I never thought about this as I > think > > if Sweave is a module, such converters should be automatically loaded. > > Can you show me the how-to on putting those 4 converters into Lyx? Thank > you > > very much. > > Ziliang > > > > > > On Wed, Jul 13, 2011 at 4:32 PM, Yihui Xie <[email protected]> wrote: > >> > >> Is there a converter from Sweave to LaTeX? Check it in the menu > >> Tools-->Preferences-->Converters. Normally you should have at least > >> four converters from Sweave to different types of LaTeX output. > >> > >> Regards, > >> Yihui > >> -- > >> Yihui Xie <[email protected]> > >> Phone: 515-294-2465 Web: http://yihui.name > >> Department of Statistics, Iowa State University > >> 2215 Snedecor Hall, Ames, IA > >> > >> > >> > >> On Wed, Jul 13, 2011 at 12:25 PM, Z.L. Li <[email protected]> wrote: > >> > Dear list members, > >> > As a newbee to Lyx, recently I tried to set it up and use the Sweave > >> > module > >> > to document some R codes > >> > I have. I ran into problems very similar to the one discussed earlier > in > >> > this tread: > >> > http://www.mail-archive.com/[email protected]/msg87193.html > >> > I looked through the replies, tried and same problem remained. I have > >> > listed > >> > what I did below and hope > >> > to find a cure. > >> > I tried the following steps in two systems: XP + MikTex 2.9 + R 2.13.0 > / > >> > Win7 + MikTex 2.9 + R 2.13.0 > >> > 1. put "C:\Program Files\MiKTEX 2.9\miktex\bin" and "C:\Program > >> > Files\R\R-2.13.0\bin" > >> > into the PATH system variable. > >> > 2. download and install RTool for 2.13.x or later, checked to add the > >> > appropriate Rtools path during > >> > installation. And "C:\Program Files\Rtools\MinGW\bin", "C:\Program > >> > Files\Rtools\MinGW64\bin" > >> > are in the PATH variable, too. > >> > 3. copy noweb.sty and Sweave.sty to "C:\Program Files\MiKTeX > >> > 2.9\tex\latex\misc" and Refresh FNDB > >> > using the MikTex setting interface. I can use "kpsewhich" under > >> > command > >> > mode to locate these two > >> > style files. > >> > 4. download LyX-2.0.0-3-Installer and install Lyx. After installation, > >> > run > >> > the Reconfigure once. > >> > When these steps finished, I opened the test file sweave.lyx, the > "View" > >> > button is "disabled". I can see > >> > the Sweave module is loaded in Lyx from the Preference tab with the > >> > typical > >> > warning: > >> > "WARNING: Some required packages are unavailable!" > >> > I am pretty much stuck at this point and don't know what else I can > do. > >> > Any > >> > help is truly appreciated. > >> > Regards, > >> > Ziliang > >> > > >> > -- > >> > Life goes on.... > >> > > > > > > > > > -- > > Life goes on.... > > > -- Life goes on....
