From michael.m.spiegel at gmail.com  Fri Aug 28 23:00:15 2009
From: michael.m.spiegel at gmail.com (michael.m.spiegel at gmail.com)
Date: Fri, 28 Aug 2009 23:00:15 +0200 (CEST)
Subject: [Rd] c() poor error reporting (PR#13917)
Message-ID: <20090828210015.7D1E6282EF42@mail.pubhealth.ku.dk>

Full_Name: Michael Spiegel
Version: 2.9.1
OS: linux
Submission from: (NULL) (137.54.6.192)


The function c() gives a cryptic error message if an "empty" argument is
accidentally passed to the function.  The expression c(,,,) yields the error
message "argument is missing, with no default".  For comparison, the expression
sum(,,,) yields the error message "element 1 is empty; the part of the args list
of 'sum' being evaluated was: (, , , )".  This type of error was produced by
accidentally typing an expression similar to "sum(c(,1,2,3))" which was a
sub-expression inside a much larger expression spanning tens of lines.  When the
entire expression was evaluated, the error message "argument is missing, with no
default" provides little context for determining the cause of the error.



[Rd] c() poor error reporting (PR#13917)
michael.m.spiegel at gmail.com