From h.wickham at gmail.com  Mon Apr 27 13:48:59 2015
From: h.wickham at gmail.com (Hadley Wickham)
Date: Mon, 27 Apr 2015 06:48:59 -0500
Subject: [Rd] Inconsistency when naming a vector
Message-ID: <CABdHhvGLwS8RbZ9QXtHjr=NoSHyEqMKcUDh7598jNMFUKKit2A@mail.gmail.com>

Sometimes the absence of a name is maked by an NA:

x <- 1:2
names(x)[[1]] <- "a"
names(x)
# [1] "a" NA

Whereas other times its

y <- c(a = 1, 2)
names(y)
# [1] "a" ""

Is this deliberate? The help for names() is a bit murky, but an
example shows the NA behaviour.

Hadley

-- 
http://had.co.nz/



[Rd] Inconsistency when naming a vector
Hadley Wickham