Is this intentional?

R:
> x <- 1:7
> x[c(1, NA, 3)] <- -(4:6)
> x
[1] -4  2 -6  4  5  6  7

so NAs are treated as FALSE

S+6.1:
> x <- 1:7
> x[c(1, NA, 3)] <- -(4:6)
Warning messages:
  Replacement length not a multiple of number of elements to
        replace in: x[c(1, NA, 3)] <-  - (4:6)
> x
[1] -4  2 -5  4  5  6  7

and NAs are ignored.

-- 
Brian D. Ripley,                  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-devel

Reply via email to