# Can I import existing .Rnw Sweave file into LyX? [closed]

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"