Home > R > Getting knitr to work with StatET

Getting knitr to work with StatET

StatET (an Eclipse plug-in that can handle, among other things, R) offers support for writing Sweave (.Rnw) documents. This is done via the external tool dialog, where one creates a new “device” that takes in a document and runs it over appropriate functions and programs. In this case, Sweave and LaTeX. This dialog can, however, be modified to use function knit from package knitr. With a little luck, you can will be able to produce handsome looking pdfs with one click.

As I’ve already said, you will need to create your “knitr device”. You can reach the appropriate menu to external tools via Run > External tools > External tools configuration and create new “Sweave document processing” launch configuration. I have used the following options. Make sure you have package knitr installed.

 

Assuming you have everything configured correctly, you can run the file through knitr with a single click*. You can do that by clicking the icon with three red arrows pointing at 010.

 

 

* Side note: You will probably need to put the documents you want to weave inside your workspace directory.

About these ads
Categories: R

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: