[Rd] Misinformative error message for vector()
Henrik Bengtsson
hb at stat.berkeley.edu
Mon Jan 21 05:50:12 CET 2008
Nothing serious, but I just noticed that if you pass a function as the
'length' argument of vector(), you get the following misinformative
error message:
> vector("list", length=function() {})
Error in vector("list", length = function() { :
negative length vectors are not allowed
whereas if you for instance do:
> vector("list", length="foo")
Error in vector("list", length = "foo") :
unimplemented type 'character' in 'asVecSize'
which is more informative.
/Henrik
More information about the R-devel
mailing list