|

|
|
R-Sweave (compatible with WinEdt version 5.5 - 6.0)
Support for R and Sweave:
- R-support is based on the RWinEdt stuff (menu, highlighting, tool bar buttons). The support is here made available in a standard WinEdt session instead of running it in a limited stand alone WinEdt instance.
- support (sweave.edt, menu, buttons, ...) for sweave, the R program which transforms LaTeX .Rnw files with R chunks into a LaTeX files with the R chunks replaced by their R outcome.
Installation
- Create a sub-folder R-Sweave in %B\Contrib (where %B probably refers to C:\Program Files\WinEdt Team\WinEdt) and put there the content of the R-Sweave.zip file.
- Open WinEdt.
- Make a backup of your present configuration (using Options | Maintenance | Backup).
- Launch the R-Sweave_install.edt macro (for instance by opening the file in WinEdt and pressing Ctrl-Shift-F9).
In WinEdt 6, you will have a default drop-down button. This can indeed be customized.
In WinEdt 5.5, you may add R-Sweave related buttons to the Tool Bar through the Enter Tool Bar Setup... dialog (contextual menu from the tool bar). However, you should first restart WinEdt to have access to the R-Sweave buttons.
Default installation is for the 64bit version of R 2.12.0 or higher.
If you have only access to the 32bit version: Before installing, open the MainMenu.ini file (or R-Sweave.dat file for the 5.5 version) provided with the support and substitute in it all occurrences of LetReg(4,'\x64') with LetReg(4,'\i386') or LetReg(4,'') if you have an older version than R 2.12.0.
Usage instructions
You can customize the menu items.
Here are the arguments (registry) that can be passed to the Sweave.edt macro:
- LetReg(4,"yyy");
- where "yyy" can be either "\i386" (32bit), "\x64" (64bit) if you are running R version 2.12.0 or higher, or "" for R version < 2.12.0.
- LetReg(6,"xxx");
- where xxx can be pdf, dvi, Stop or Direct, the latter being an alias of pdf.
- LetReg(7,"R installation path");
- can be used to tell the macro where it can find the R binaries. If empty, sweave.edt uses the value given by the Windows registry.
- LetReg(8,"cache");
- for running cacheSweave instead of Sweave.
- LetReg(8,"R");
- for running Stangle instead of Sweave. Stangle just concatenates all chuncks into a single %n.R file. Indeed when choosing this option, the %!6 register will be ignored.
- LetReg(9,"open");
- When set Sweave.edt just opens an R console.
Download
For WinEdt 5.6 or older: R-Sweave-55.zip [31 KB]
For WinEdt 6.0 or later: R-Sweave-6.zip [32 KB]
Configuration component contributed by Gilbert Ritschard <gilbert.ritschard unige.ch>, with the help of Karl Koeller <karlkoeller gmail.com> for the WinEdt 6 install macro
|