[Rd] Feature request: Allow comma after last element in a list

Berwin A Turlach berw|n@tur|@ch @end|ng |rom gm@||@com
Sat Apr 25 08:53:36 CEST 2026


On Fri, 24 Apr 2026 11:08:40 +0200
Manfred Kooistra <manfred.kooistra using gmail.com> wrote:

> I've always been irritated that R doesn't allow a comma after the
> last element in a "list":
[...]
> This makes updating lists unnecessarily cumbersome, [...]

One approach that I saw people use to get around this issue (which I do
not like on aesthetic grounds YMMV) is to put the comma not at the end
of a line but at the beginning of the next line:

> a <- c(
+ 1
+ ,2
+ ,3
+ )

This makes it easy to insert additional lines.

Cheers,

	Berwin



More information about the R-devel mailing list