Grokbase Groups R r-help August 2012
FAQ

On Mon, 20 Aug 2012, William Dunlap wrote:

You get this error if the factor given as the group argument
has any unused factor levels. E.g.,
with(Golden, cenboxplot(Blood, BloodCen, factor(DosageGroup,levels=c("Low","High","<unused>"))))
Error in if ((length(obs[censored])/length(obs)) > 0.8) { :
missing value where TRUE/FALSE needed
Bill,

There are only two grouping levels: pre-mining and mining:

str(as.d)
'data.frame': 578 obs. of 8 variables:
$ site : Factor w/ 64 levels "D-1","D-2","D-3",..: 12 12 12 12 12 12 12 12 ...
$ sampdate: Date, format: "1993-01-21" "1993-02-11" ...
$ era : Factor w/ 2 levels "Mining","Pre-mining": 2 2 2 2 2 2 2 2 ...
$ param : Factor w/ 64 levels "AgDis","AgTot",..: 6 6 6 6 6 6 6 6 6 6 ...
$ quant : num 0.004 0.004 0.005 0.005 0.003 0.006 0.005 0.004 0.003 ...
$ ceneq1 : logi FALSE FALSE FALSE FALSE FALSE FALSE ...
$ floor : num 0.004 0.004 0.005 0.005 0.003 0.006 0.005 0.004 0.003 ...
$ ceiling : num 0.004 0.004 0.005 0.005 0.003 0.006 0.005 0.004 0.003 ...
To work around it use factor(group) instead of group when calling cenboxplot.
Since era is already a factor this throws another error.

The gzipped output of dput is attached.

Thanks,

Rich

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 8 of 8 | next ›
Discussion Overview
groupr-help @
categoriesr
postedAug 15, '12 at 9:28p
activeAug 20, '12 at 5:49p
posts8
users4
websiter-project.org
irc#r

People

Translate

site design / logo © 2017 Grokbase