[R] fitting models with gnls

Peter Dalgaard BSA
Fri, 07 Sep 2001 15:40:30 -0000

"Antonio Olinto" <aolinto at bignet.com.br> writes:

> Error in "[<-.factor"(*tmp*, , value =
grpShrunk[revOrderShrunk]) :
>         Argument "i" is missing, with no default


Hmm. That probably comes from an assignment f[]<-something where f is
a factor. The same thing is seen with

f<-factor(1:3)
g<-factor(3:1)
f[]<-g

This might count as a bug in R. You could try fixing [<-.factor
yourself. The offending line would be

  x[i] <- m

and might be happier as

  if (missing(i)) x[] <- m else x[i] <- m

or

  x[if (missing(i)) TRUE else i] <- m

--
   O__  ---- Peter Dalgaard             Blegdamsvej 3
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907