Hi I'm trying to debug one of my functions, which stopped with the following message: Error in is.vector(x.star) : subscript out of bounds So I put a "print(x.star)" statement in just before the is.vector bit and got Error in print(x.star) : subscript out of bounds So I put "dput(x.star)" in and got Error in dput(x.star) : subscript out of bounds what's going on here? How best to proceed? -- Robin Hankin Uncertainty Analyst Southampton Oceanography Centre European Way, Southampton SO14 3ZH, UK tel 023-8059-7743
Robin Hankin <r.hankin at soc.soton.ac.uk> writes:> Hi > > I'm trying to debug one of my functions, which stopped with the > following message: > > > > Error in is.vector(x.star) : subscript out of bounds > > > So I put a "print(x.star)" statement in just before the is.vector bit > and got > > > Error in print(x.star) : subscript out of bounds > > > So I put "dput(x.star)" in and got > > Error in dput(x.star) : subscript out of bounds > > > > what's going on here? How best to proceed?If x.star is an argument to your function, watch out for lazy evaluation. It could be that *any* use of x.star triggers a faulty computation in the caller. It might be informative to print(substitute(x.star)) -- 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