Source

roux /

Filename Size Date modified Message
example-output
r
2.6 KB
121 B
3.4 KB
Roux is an R package and a Python script which, together, lets you run R code and make a nice transcript formatter or HTML or LaTeX. It's great if you want to send a report to a non-R user, or if you're working without an R GUI and want to see your output formatted nicely (with inline images).

INSTALLATION
The source code for Roux is located at http://bitbucket.org/ananelson/roux

You can download code from there, or get it using the Mercurial version control system:
hg clone http://bitbucket.org/ananelson/roux

.
|-- README
|-- example-output
|   |-- 482776873.png
|   |-- 734813638.png
|   |-- example.Roux.html
|   |-- example.pdf
|   `-- example.tex
|-- example.R
|-- r
|   |-- DESCRIPTION
|   `-- R
|       `-- RedefineDevices.R
`-- roux.py


To install the R package, change into the r directory and type:
R CMD INSTALL .

To check whether the package has been installed, from your command line type:
R -e "library(Roux)"

or within R type
library(Roux)

Make sure to capitalize the R in Roux!

If the package loads, then Roux has been installed. If you get an error message saying
"there is no package called 'Roux'", then something has gone wrong.


Now, let's try running the Python script:

Try typing:
python roux.py --help

You should see something like this:
ana$ python roux.py --help
Usage: roux.py [options]

Roux is a small utility to run R scripts and turn the output into self-
contained HTML or LaTeX. Roux is focused on simplicity, if you are looking for
a more flexible and powerful tool, then please check out http://dexy.it

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -q, --quiet           don't print R's startup message
  -s, --slave           pass the --slave flag to R, so only print output
  -u, --utf8            switch encoding to UTF-8 (default: don't change
                        encoding)
  -o OUTPUT_FILE, --output-file=OUTPUT_FILE
                        specify file to write output to.



Now try running the script on the example.R file

python roux.py example.R

It should create a file called example.Roux.html and an image file with a .png extension

Now, if you have a LaTeX compiler installed, try creating a LaTeX document:
python roux.py -o example.tex example.R

and then running your LaTex compiler on the example.tex output file. You should get a PDF document.

If you can in roux by calling 

./roux.py --help
or
roux.py --help

then you can try copying the file to a location on your PATH so that you can run it from anywhere in your system. You might also be able to rename roux.py to just roux.