From hb at stat.berkeley.edu  Mon Jan 21 05:50:12 2008
From: hb at stat.berkeley.edu (Henrik Bengtsson)
Date: Sun, 20 Jan 2008 20:50:12 -0800
Subject: [Rd] Misinformative error message for vector()
Message-ID: <59d7961d0801202050o2bd08ad4y3ac6131305814c53@mail.gmail.com>

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



[Rd] Misinformative error message for vector()
Henrik Bengtsson