Patrick Burns
2009-Nov-14 12:02 UTC
[Rd] Wish: more explicit error message with missing argument in c
Consider: > c(,2) Error: argument is missing, with no default That there is no traceback is unfortunate but understandable. If such a mistake were made like this, there wouldn't be much problem. But the mistake is likely to be made in more complicated settings: > rbind(c(,2), c(3,4)) Error in rbind(c(, 2), c(3, 4)) : argument is missing, with no default > traceback() 1: rbind(c(, 2), c(3, 4)) So naive (and not-so-naive) users will be led to think the problem is with 'rbind' and not with 'c'. If the message could be: Error: argument to 'c' is missing, with no default Then that would be satisfactory, I think. Patrick Burns patrick at burns-stat.com +44 (0)20 8525 0696 http://www.burns-stat.com (home of "The R Inferno" and "A Guide for the Unwilling S User")