Skip to content
Prev 33716 / 398502 Next

help on R programming.

On Mon, 23 Jun 2003, Murad Nayal wrote:

            
This is in the FAQ, section 3.3.3, and is an S/R difference that catches
people quite often.  It's related to the difference between [] and [[]].

Generally you will find that it is better to program by generating whole 
lists with lapply() or to copy lists retaining what you want (which does 
not copy the components, in general, and so is cheap).


As for your comments on books: `S Programming' does discuss the design of
classes (both informal and formal), the main data sructures in R. As
others have said, the Green Book (Chambers, 1998) is by not means out of
date, except in the sense that the precise langage it describes has never
been available: it is not a description of any version of S-PLUS nor R.

Generally, though, you need to make sure you have at your fingertips the
resources which come with R: the various manuals (including R-lang) and
the on-line help.  For example, I have just spend several days documenting
in the help pages exactly how subscripting of data frames works (and
correcting dozens of anomalies and bugs).