[R] [FORGED] Re: help with r package "trip"
Rolf Turner
r.turner at auckland.ac.nz
Wed Jun 15 10:49:22 CEST 2016
On 15/06/16 20:18, Jim Lemon wrote:
> 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: This seems to me to be somewhat off the point. The OP was faced
with the problem of not being able to access the function homedist().
This function seems *not* to be exported from the trip package, and yet
it is a *documented* function which I would assume to imply that users
should be able to invoke it directly.
It is possible that in the past the OP was dealing with a version of the
trip package that was created before namespaces came into the picture,
whence "exporting" was not relevant. I would suggest that the OP
contact the package maintainer (maintainer("trip") will give you the
email address) and enquire as to what is going on.
In the interim, a workaround *might* be to invoke homedist() as
trip:::homedist(<whatever>)
Note the *triple* colon in the foregoing. I am not at all familiar with
the trip package so my advice should probably be taken with several
grains of salt.
cheers,
Rolf Turner
--
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276
> On Wed, Jun 15, 2016 at 1:43 PM, Alice Domalik <adomalik at 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!
More information about the R-help
mailing list