Skip to content
Prev 65277 / 398525 Next

Warning: number of items to replace is not a multiple of replacement length

Lyle W. Konigsberg wrote:

            
Please read some introductory literature regarding the S / R language!
Your code is not vectorizable at all.


In
   tot <- Makeham(tt)*trans(tt)

Makeham has length 2 and works (I guess), but in  trans(tt) you have

   lage=log(age)

which has length 2, but you get also length 2 in

   R[j]<-alpha1[j]-beta[j]*lage}

but assign it to a scalar value.