From h.wickham at gmail.com  Fri Sep 29 18:20:18 2006
From: h.wickham at gmail.com (hadley wickham)
Date: Fri, 29 Sep 2006 11:20:18 -0500
Subject: [Rd] Warning: a final empty element has been omitted
Message-ID: <f8e6ff050609290920i69d88d0bseff9652efbdcb83d@mail.gmail.com>

How can I suppress this warning?

> options(warn = -10)
> list(1,2,3,)
Warning: a final empty element has been omitted
the part of the args list of 'list' being evaluated was:
   (1, 2, 3, )
[[1]]
[1] 1

[[2]]
[1] 2

[[3]]
[1] 3

> suppressWarnings(list(1,))
Warning: a final empty element has been omitted
the part of the args list of 'list' being evaluated was:
   (1, )
[[1]]
[1] 1


And can anyone add some insight as to why this warning was added?  It
was nice to be able to use a construction like:

a <- list(
 b = 3,
 c = 4,
)

so when you added a new line, you could just copy and paste an existing line.

Hadley




[Rd] Warning: a final empty element has been omitted
hadley wickham