On May 17, 2013, at 7:44 AM, Rémi Lesmerises wrote: > Dear all, > > I'm trying to get a Brownian bridge kernel (kernelbb) for each combination of > two consecutive animal locations (see commands below) and put them, with a > loop, inside a list. It works well at the beginning but after 42 runs, it > appears the following warning : > > >> Error in seq.default(yli[1], yli[2], by = diff(xg[1:2])) : >> invalid (to - from)/by in seq(.) > > I looked at the coordinates, at the id, at the time of the run 43 and it's > all good... > > I looked on the net and it happened to only one person and there was no > answer to his post.
I wonder if that posting (like yours) had no data on which to display the problem or to test potential solutions? I would think you would want to post any setup objects and then data for items 40-45. > > Someone could help me? > > ## commands > > BBtraj <- list() > for (i in 1:(nrow(loc@data)-1)) { > BBtraj[[i]] <- kernelbb(as.ltraj(loc@coords[i:(i+1),], > date=loc@data$time[i:(i+1)], id = as.character(loc@data$id[i:(i+1)]), > typeII = TRUE), sig1=as.numeric(as.character(loc@data$sig1[i])), sig2= 5, > grid = 1000) > } > -- David Winsemius Alameda, CA, USA ______________________________________________ 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.