2

I am migrating/branching from sweave to knitr and can run @yihui's minimal example in Rstudio but am having trouble making it run with Lyx (2.06). I get the message The module knitr has been requested by this document but has not been found in the list of available modules.

My PATH is /usr/bin/Rscript (per which Rscript, as per @yihui's suggestion here) so that appears visible, but lyx doesn't seem to see it.

I also did upgrade to R version 3.0.1 (Good Sport) today as a part of a larger system upgrade (Mint 13 to Mint 15), thus coinciding with when I started using Lyx so there may be other stuff going on at the same time. I do assume that R 2.15 and 3.0.1 have the same PATH (as noted, currently /usr/bin/Rscript) and that Rstudio and Lyx are not looking for different installations?

Community
  • 1
  • 1
ako
  • 3,569
  • 4
  • 27
  • 38
  • 1
    Did you try `Tools->Reconfigure`? Normally Linux users do not need to worry about `PATH` problems. Also check if `Rscript --version` works in the terminal. – Yihui Xie May 23 '13 at 14:48
  • Thanks, @Yihui,I did try that. The Rscript version is `R scripting front-end version 3.0.1 (2013-05-16)`. The 'rest' of the system sees `knitr`, seemingly fine. – ako May 23 '13 at 14:51
  • 1
    Can you try removing your user-dir (back it up if there's something you want to keep)? Thus, exit LyX, remove ~/.lyx, start LyX. Also, how did you install 2.06? Did you use the [Ubuntu PPA](http://wiki.lyx.org/LyX/LyXOnUbuntu#toc3)? Did you compile from source? If you start a new document and go to Document > Settings > Modules, can you add knitr there? – scottkosty May 23 '13 at 16:09
  • @scottkosty I used the ubuntu PPA. I also followed your suggestion and removed `~./lyx` and lo and behold!!!! I can now see `RNW (knitr)`. I had an installation of Lyx pre-2.0.6 from a year ago or so, so something in the user dir may have compromised the search path. Can't say what or why. You want to post as a response? – ako May 23 '13 at 17:49
  • Yes, weird stuff can happen like that. Glad you got it working. – scottkosty May 23 '13 at 18:44

1 Answers1

1

Exit LyX, remove (back-up if desired) ~/.lyx, and start LyX.

scottkosty
  • 2,410
  • 1
  • 16
  • 22