Skip to content
Prev 303741 / 398506 Next

NADA package/cenboxplot() method: maximum censored percentage

You get this error if the factor given as the group argument
has any unused factor levels.  E.g.,
Error in if ((length(obs[censored])/length(obs)) > 0.8) { : 
  missing value where TRUE/FALSE needed

(0/0 is NaN, which triggers the 'missing value where TRUE/FALSE needed' message.)

You should complain to the maintainer of the NADA package - the test should be
more like 'length(obs)>0 && ...'.

To work around it use factor(group) instead of group when calling cenboxplot.

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com