Skip to content
Prev 277962 / 398506 Next

Function gives numeric(0) for every input

Well, you assign numeric(0) or numeric(0)+1, which is still
numeric(0). No wonder the return value is always numeric(0).

You probably need to replace numeric(0) simply by 0. Numeric(0) does
not mean 0, it means a numeric vector of length zero (i.e., empty).

HTH,

Peter
On Sat, Nov 19, 2011 at 6:52 PM, alex_janssen <janssena at uoguelph.ca> wrote: