Open Miguelbirostris opened 1 year ago
I was able to resolve this by removing a comma in the prt_trim() function using the trace function.
trace(track_pts, edit = T)
Then on line 22 of the trace (42 of the function file) remove the comma within brackets
trkpts <- trkpts[head_start:tail_end,] #Comma at the end of this line
There may be times where that trailing comma is appropriate, but i think posting a sample of the source datasets here could help us tease out a version of this function that handles those cases but also your cases in a sensible way.
@Miguelbirostris thank you for posting this Issue. And, thank you to @mfutia and @jdpye for your comments.
I'm fairly certain that 'comma' is a typo ... but, need some time to double check with some sample data. So, if you can share a small dataset as part of a regex, that would be helpful as an additional check.
I suspect there are still some older/naive 'less than best' coding practices sprinkled throughout pathroutr
with respect to some of the dplyr
/purrr
functions underneath. This could also be one of those situations.
Hi! I am working around a satelite tracking dataset in which several of the last points en up over and (an animal moving closely to the coastline). I jave tried to apply prt_trim() as suggested by pathroutr, but I am etting this error.
Any workaround?