05.12.2012 Views

What documentation exists for R?

What documentation exists for R?

What documentation exists for R?

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 7: R Miscellanea 85<br />

from SAS, <strong>for</strong> example). These do not depend on the order of factors in the model. The<br />

question of which set of sums of squares is the Right Thing provokes low-level holy wars on<br />

R-help from time to time.<br />

There is no need to be agitated about the particular sums of squares that R reports. You<br />

can compute your favorite sums of squares quite easily. Any two models can be compared<br />

with anova(model1, model2), and drop1(model1) will show the sums of squares resulting<br />

from dropping single terms.<br />

7.19 How do I produce PNG graphics in batch mode?<br />

Under Unix, the png() device uses the X11 driver, which is a problem in batch mode or<br />

<strong>for</strong> remote operation. If you have Ghostscript you can use bitmap(), which produces a<br />

PostScript file then converts it to any bitmap <strong>for</strong>mat supported by Ghostscript. On some<br />

installations this produces ugly output, on others it is perfectly satisfactory. In theory one<br />

could also use Xvfb from X.Org, which is an X11 server that does not require a screen; and<br />

the GDD package from CRAN, which produces PNG, JPEG and GIF bitmaps without X11.<br />

7.20 How can I get command line editing to work?<br />

The Unix command-line interface to R can only provide the inbuilt command line editor<br />

which allows recall, editing and re-submission of prior commands provided that the GNU<br />

readline library is available at the time R is configured <strong>for</strong> compilation. Note that the<br />

‘development’ version of readline including the appropriate headers is needed: users of<br />

Linux binary distributions will need to install packages such as libreadline-dev (Debian)<br />

or readline-devel (Red Hat).<br />

7.21 How can I turn a string into a variable?<br />

If you have<br />

you can do<br />

<strong>for</strong><br />

or<br />

<strong>for</strong><br />

or<br />

<strong>for</strong><br />

varname

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!