7

I am trying to import an existing Sweave .Rnw file into LyX. I wonder whether LyX is capable of doing it? My LyX version is 2.02 and I can use its Sweave module with no problem. I find out it does have an import Sweave option but I cannot import the simplest .Rnw file like the one below.

\documentclass{article}
\usepackage{Sweave}
\author{ZZ}

\begin{document}
\title{Simple}
\maketitle
\section{Simple Examples}
A simple example:
<<>>=
N <- 5
N
@
\end{document}

When I try to import this file, it gives me the following error message:

An error occurred while running:
Rscript --verbose --no-save --no-restore
"/Applications/LyX.app/Contents/Resources/scripts/lyxsweave.R"
"/Volumes/COMMON/Documents/""addone.Rnw"
"/Volumes/COMMON/Documents/""addone.tex"
"/Volumes/COMMON/Documents/"

Am I doing anything wrong? Shall I do it differently?

closed as too localized by Stephan Lehmke, Mensch, Qrrbrbirlbel, Stefan Kottwitz Dec 1 '12 at 23:01

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

  • given the number of up votes. I think this question should not be closed. – Biorelated Jul 19 '14 at 18:27

Browse other questions tagged or ask your own question.