From h@wickh@m @ending from gm@il@com  Mon Jul 23 21:23:30 2018
From: h@wickh@m @ending from gm@il@com (Hadley Wickham)
Date: Mon, 23 Jul 2018 14:23:30 -0500
Subject: [Rd] Is NULL a vector?
In-Reply-To: <12e7b0be-5284-39a0-e3d9-b1558901bc53@gmail.com>
References: <CABdHhvHuCuaytOP-5VOYO=5+fiQQPNFPYeeU-jJrN9=k_1t+yA@mail.gmail.com>
 <12e7b0be-5284-39a0-e3d9-b1558901bc53@gmail.com>
Message-ID: <CABdHhvGAwKu4-v-d=OWpVUHz0xnDxTkXtn=sP2OgavZ6nmHT3Q@mail.gmail.com>

On Mon, Jul 23, 2018 at 2:17 PM, Duncan Murdoch
<murdoch.duncan at gmail.com> wrote:
> On 23/07/2018 3:03 PM, Hadley Wickham wrote:
>>
>> Hi all,
>>
>> Would you generally consider NULL to be a vector?
>
>
> According to the language definition (in the doc directory), it is not:
> "Vectors can be thought of as contiguous cells containing data. Cells are
> accessed through indexing operations such as x[5]. More details are given in
> Indexing.
>
> R has six basic (?atomic?) vector types: logical, integer, real, complex,
> string (or character) and raw. The modes and storage modes for the different
> vector types are listed in the following table."
>
> and later
>
> "There is a special object called NULL. It is used whenever there is a need
> to indicate or specify that an object is absent. It should not be confused
> with a vector or list of zero length."

Perfect, thanks!

Also available online at
https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Vector-objects

Hadley

-- 
http://hadley.nz



[Rd] Is NULL a vector?
Hadley Wickham