[Rd] plot.ranef.lme (PR#2986)
deepayan at stat.wisc.edu
deepayan at stat.wisc.edu
Mon May 12 20:43:36 MEST 2003
On Monday 12 May 2003 11:14 am, p.dalgaard at biostat.ku.dk wrote:
> library(nlme)
> data(Phenobarb)
> na.include <- function(x)x
> phe1 <- nlme(conc~phenoModel(Subject, time, dose, lCl, lV),
> data = Phenobarb,
> fixed = lCl+lV~1,
> random= pdDiag(lCl+lV~1),
> start = c(-5,0),
> na.action = na.include,
> naPattern = ~!is.na(conc))
>
> phe.ranef <- ranef(phe1,augFrame=TRUE)
> plot(phe.ranef, form=lCl~Wt+ApgarInd)
>
> [Error in max(length(x0), length(x1), length(y0), length(y1)) :
> Argument "x0" is missing, with no default]
>
> The cause is plain to see: in plot.ranef.lme we have
>
> staple.ends <- list(x1 = c(rep(X - w, 2), rep(X +
> w, 2)), y1 = rep(c(Y[5], max(Y[1] - e.u, Y[2])),
> 2), x2 = c(rep(X - w, 2), rep(X + w, 2)), y2 =
> rep(c(min(Y[5] + e.l, Y[4]), Y[1]), 2)) . . . .
> do.call("lsegments", c(staple.ends, box.umbrella))
>
> but lsegments expects arguments named x0,y0,x1,y1 not x1,y1,x2,y2
I have seen this problem before and I remember fixing lsegments to work with
both forms of the arguments. But the CVS doesn't have the fix, so I guess I
made it somewhere temporarily and forgot to add it to CVS, sorry. I'll fix
this for the next release.
Deepayan
More information about the R-devel
mailing list