DETAILED INSTALLATION PROCEDURE

Download Eclipse 177mb version – classic version

http://www.eclipse.org/downloads/

Installation of the R Package rj

install.packages("rj", repos="**http://download.walware.de/rj-0.5**")

**
Install the package rJava**

install.packages(“rJava”)

**
GetStatET plugin**

http://download.walware.de/eclipse-3.6

Import the existing project in to eclipse work space

Configure StatET plugin

Browse the R folder on your machine and give the configured R installation a name.

image

Configure the Run

image

Working Directory should the directory where all your code is present

**
Configure external tool to change a tex file to pdf**

image

Change the output format to pdf and Buildcommand to pdflatex.exe

  • 1. Copy fancyvrb.sty in to folder which has tex file

  • C:\Program Files\R\R-2.13.0\share\texmf\tex\latex

  • 2. Rnw-tex(asciidoc)-tex file

  • Install asciidoc package

  • Copy blogpost.py in to some folder C:\Cauldron\garage\blogpost\blogpost.py

  • Install python2.6.4

  • library(ascii)

  • Sweave(“test.Rnw”,RweaveAsciidoc)

  • This will generate a txt file

  • usepostcontent.bat to post

Having solved that minor problem, the next issue was that my .tex file was being created, but when texi2dvi was being called by Eclipse in the R console, MiKTeK could not find a Sweave.sty file to help process the .tex file. That manifested itself with this error window:

image

MiKTeK can’t find the Sweave.sty file, so this window pops up in Eclipse. One way to fix this error would be to place a copy of the Sweave.sty file in the same directory as your .Rnw file. The basic Sweave.sty file for R can typically be found in your R directory under share/texmf/tex/latex/Sweave.sty

Alternately, you can inform MiKTeK of where your Sweave.sty file lives (in that same share/texmf/tex/latex/ directory) using the directions found here: http://docs.miktex.org/manual/localadditions.html#id573835. My version of that fix is as follows:

Open the MiKTeK Settings control panel by going to Start>MiKTeK 2.9>Maintenance>Settings. Click on the Roots tab when the control panel opens.

image

Open the MiKTeK settings window.

On the Roots tab, choose “Add” at the bottom. Browse to the share/texmf/ directory in your R installation.

image

Choose the /share/texmf directory in your current R installation folder.

After doing this, you should see that directory path in the Roots tab:

image

The R /share/texmf directory path is now in the list of MiKTeX directories.

1. Yet another stumbling block I’ve run into is how R and Sweave deal with R/S expressions within the body of the text, particularly expressions that contain a $ sign. For example, if I try to return the mean value from a column of a data frame ‘df’ in the text of my .Rnw file:blah blah blah \Sexpr{mean(df$column, na.rm = TRUE)} blah blah blah. The TeX document will often freak out because it thinks the $ sign is supposed to signal the start of a chunk of math code. This can be fixed by adding an extra option to the Sweave call that I invoke through Eclipse/StatEt. While you have a .Rnw file active in the text editor of Eclipse, go to the menu Document>Create/Edit Profiles (alternately, you can get there by going to the menu Run>External Tools>External Tool Configurations). In the window that opens, click on the Sweave processing profile you’ve created (see figure below). In the “Run command in active R Console:” box, change the code snippet to read:
Sweave(file = “${resource_name}”, syntax = “SweaveSyntaxNoweb”)

image

Add in the syntax = “SweaveSyntaxNoweb” option to streamline the interpretation of R code chunks in the text of your .Rnw document.

· Rd file is R documentation file – How to create and use such documentation file?

· Multiple files can be seen by merely just dragging the tab outside of the usual window

· Right click on the file and click on compare with local version

1. Add this snippet in eclipse.ini file

a. -Duser.name=Radha Krishna

2. Customize R files that appear in the IDE

Open the StatET section of the left menu tree, click on Code Generation. In the upper right window, open the R Code menu tree, and click on the New R Script File item. In the preview window, you’re shown an example of the automatically generated code that will be inserted at the head of every new R script file your create in Eclipse. You can edit this by hitting the Edit button.

image

Modifying the code generation settings. New variables can be inserted and deleted at will. Eclipse will show you the available code snippets if you enter a $ in the window.

In the Edit Template window, I’ve made a few changes. I inserted a line that says
# Filename: ${file_name}
That will print out “Filename:” and follow it with the name of each newly created R script file I make.
I also modified the 3rd line as follows:
# Author: ${user} ${date}
That will print out “Author:” followed by the user name I specified in the eclipse.ini file, followed by the current date.To save the changes, hit OK, and then hit Apply in the Preferences Window.If I create a new R script, which I’ve called “junk.R” here, I get the following automatically generated code in the window:

image

The result of the automatic code generation.

INSTALL R TOOLS http://www.murdoch-sutherland.com/Rtools/

How to generate R documentation files

Wherever you want the output to reside , just type the directory in the output version.

This needs to be done in RCMD Tools. type is specified as html

Output is specified as a html file

image

Click on the Rd file and generate the documentation file in a html format

There is no need to configure R package builder as it is useless. You often use R Tools to get stuff done

TeXclipse Homepage Builder needs to be configured

image

I faced enormous difficult in converting a Rnw file to Pdf from ECLIPSE. I had done in innumberable times but forgot the settings. What I needed to do was copy fancyvrb.st in to R folder C:\Program Files\R\R-2.13.0\share\texmf\tex\latex

Once this is done, you can produce documents from Rnw

ALWAYS REMEMBER

You need to set the working directory to a specific folder that you are working and then run

RnwToPDF

image

Bin director of TeX distribution needs to be included here –

C:\Program Files\MiKTeX 2.7\miktex\bin

Refer to this link for configuring texlipse plugin

http://texlipse.sourceforge.net/manual/configuration.html