On Thu, Jul 02, 2015 at 03:16:05PM -0700, Rich Shepard wrote:
> On Thu, 2 Jul 2015, Rich Shepard wrote:
> 
> > How do I tell Sweave that the data frame, b.cast, is in the same directory
> >as the document?
> 
>   And, ... there is no Sweave article class; I've been using KOMA-article.
> 
> Rich

Hi Rich,

Let's take this step-by-step. First, I strongly recommend using knitr
over Sweave (this is not just a personal preference). If you go to
Help > Specific Manuals > Knitr and compile, does it work?

If so, now let's see how to add knitr to a new document. Above you said
that there is no Sweave article class. Indeed, because you can add it to
any class as a module. Go to Document Settings > Modules and add the
"Rnw (knitr)" module. Click "Add" and then "OK".

No in your document, either use ERT like in the knitr manual (try just
copying over the junk), or what I recommend is to use the knitr Chunk
environment. To do this latter, go to Insert > Custom Insets > Chunk
(this is now there because you've added the module).  After you add the
chunk, try just putting in "rnorm(5)". That's it, no beginning <<>>= and
no ending @. The chunk inset does that for you.

Now compile. Does it work?

Scott

Reply via email to