[R] odd feature

Thomas Lumley tlumley at u.washington.edu
Mon May 22 16:12:26 CEST 2006


On Sun, 21 May 2006, ivo welch wrote:
>
> Aside, I like the flexibility of R, but I am not thrilled by all the
> recycling rules.  I either mean I want a scalar or a vector of
> equal/appropriate dimension.  I never want a recycle of a smaller
> vector.  (I do often use a recycle of a scalar.)
>

One case where the vector-vector recycling rules are used is in 
vector-matrix operations:
    a<-1:4
    b<-diag(4)
    a+b

 	-thomas



More information about the R-help mailing list