lapply(NULL, ...) returns empty list
On Thu, Sep 4, 2008 at 4:01 PM, Vadim Organovich
<vogranovich at jumptrading.com> wrote:
Dear R-devel, Is there a reason that lapply(NULL, ...) returns the empty list, rather than NULL? It seems intuitive to expect the latter, and rather counterintuitive that lapply(list(), ... ) returns the same value as lapply(NULL, ...).
X: a vector (atomic or list) or an expressions vector. Other
objects (including classed objects) will be coerced by
'as.list'.
as.list(NULL)
list() Hadley