jmsigner / amt

37 stars 13 forks source link

lonlat=TRUE error #107

Closed StonerKA closed 5 months ago

StonerKA commented 5 months ago

When using any variation of the steps() or step_lengths() functions with lonlat=TRUE, I am getting the following error:

Error in UseMethod("units") : no applicable method for 'units' applied to an object of class "logical"

It seems to be an issue with the 'units' class of the st_distance output within the steplengths() function. I've tried to edit the function in my global environment to drop the class 'units,' but my final output isn't retaining the sl column. I'm wanting to see my step length distribution by geographic distances.

jmsigner commented 5 months ago

Thanks for reporting. It should be fixed with the lasted push to GitHub:

library(amt)
deer |> transform_coords(4326) |> step_length()