Re: [Rd] Misinformative error message for vector()

2008-01-21 Thread Prof Brian Ripley
Easy to fix, and less serious than > vector("list", length=NaN) list() On Sun, 20 Jan 2008, Henrik Bengtsson wrote: > 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",

[Rd] Misinformative error message for vector()

2008-01-20 Thread Henrik Bengtsson
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