Never used coplot, but why not try removing the rows with missing variables?
Perhaps with:
dat <- cbind(E2=resid(baea.ancova6, type = "normalized"), year,
population)
coplot(E2~year|population, data=dat[apply(dat, 1, function(x) !any(is.na
(x))),])
Regards,
Simon Knapp
On Mon, Jan 18, 2010 at 6:54 AM, LisaB <lisabaril@hotmail.com> wrote:
>
> Hello - I'm trying to construct a coplot to check the residuals
conditioned
> on a factor using the following formula, however I keep getting an error
> message. I've used the same formula for another data set and it worked
> fine
> - the only difference is that now I have missing values for each level (2
> levels) of the factor. Is this the problem and how can I fix it. Thank
> you.
>
> > E2 <- resid(baea.ancova6, type = "normalized")
> > coplot(E2~year|population)
> Error in bad.lengths() : incompatible variable lengths
>
> --
> View this message in context:
> http://n4.nabble.com/coplots-with-missing-values-tp1016157p1016157.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
[[alternative HTML version deleted]]