Hi Alice, Have you tried creating a vector of the start position (xpos[1],ypos[1]):
xstart<-rep(xpos[1],n) ystart<-rep(ypos[1],n) # where "n" is the number of subsequent positions in the trip max(trackDistance(xstart,ystart,xpos[2:n],ypos[2:n],...)) may then give you the value of the longest distance from the start. I don't have the trip package or I could see if you really need to replicate the start positions. JIm On Wed, Jun 15, 2016 at 1:43 PM, Alice Domalik <adoma...@sfu.ca> wrote: > Hi List, > > I'm relatively new to R, so apologies if my question is rather elementary. > I'm working with some bird tracking data and I would like to calculate the > maximum distance traveled from the colony. > For the maximum distance traveled, I was going to use the function > homedist(). However, when I try to use this function I get the following > error: > Error: could not find function "homedist" > Anyone know why I would get this error? I have been using other functions in > "trip" without an issue. Is there an alternative way I can calculate this? > > Thanks in advance for any help! > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.