[R] Combined variable names (two concrete suggestions)

Douglas Bates bates at cs.wisc.edu
Thu Dec 2 00:41:20 CET 2004


Tiago R Magalhaes wrote:

> For loops are conceptually very easy to understand. Lists are not 
> easy to understand (why list[[1]] instead of list[1]? it's not 
> completely intuitive) .

I try to explain it as comparable to the difference between a subset 
that consists of one element (the "[" function always returns a vector 
of the same mode as its argument) and the element itself.

Whether that explanation makes sense depends on how comfortable the 
listener is with mathematical abstractions.  As they say, "There are 10 
types of people in this world: those who understand binary numbers and 
those who don't."




More information about the R-help mailing list