[Rd] vector(NA, 3) (PR#1541)

ripley@stats.ox.ac.uk ripley@stats.ox.ac.uk
Sat, 11 May 2002 08:28:56 +0200 (MET DST)


On Sat, 11 May 2002 pgilbert@bank-banque-canada.ca wrote:

> I don't seem to be able to initialize a vector of NAs. I hope this is a
> bug and not a new feature (I realize I have not paid much attention to a
> lot of recent discussion about NA):

It's an incorrect use!

>From the help page:

    mode: A character string giving an atomic mode, or `"any"'.

I think you meant rep(NA, 3).


>
> platform sparc-sun-solaris2.6
> arch     sparc
> os       solaris2.6
> system   sparc, solaris2.6
> status
> major    1
> minor    5.0
> year     2002
> month    04
> day      29
> language R
> >
> > vector(NA, 3)
> Error in vector(NA, 3) : vector: cannot make a vector of mode "NA".
> > matrix(NA,2,2)
>      [,1] [,2]
> [1,]   NA   NA
> [2,]   NA   NA

> Paul Gilbert
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._