cbracis / recurse Goto Github PK
View Code? Open in Web Editor NEWR package to analyze recursions in movement trajectories
License: Other
R package to analyze recursions in movement trajectories
License: Other
I am getting an error when calling getRecursions using a data.frame. I have tried to debug by looking at the source code but can not determine the error. The data should work in the function. See below.
head(tmp)
x y t id
13045 672819 5536219 2015-03-08 01:02:00 57A.2015
86033 694654 5523683 2015-03-08 03:00:00 57A.2015
30737 695160 5523393 2015-03-08 03:02:00 57A.2015
86035 698207 5521674 2015-03-08 05:02:00 57A.2015
4911 694639 5523749 2015-03-08 06:00:00 57A.2015
5398 694549 5523802 2015-03-08 06:02:00 57A.2015
sapply(tmp, class)
$x
[1] "numeric"
$y
[1] "numeric"
$t
[1] "POSIXlt" "POSIXt"
$id
[1] "character"
recurse::getRecursions(tmp, radius=100)
Error in getRecursionsCpp(x[, 1], x[, 2], x[, 3], x[, 4], x[, 1], x[, :Not compatible with requested type: [type=list; target=double].
Hi,
I am trying to use the getRecursionsInPolygon() function, but I keep getting the following error (and additional warning):
Error in if (isNewTrack[j]) { : missing value where TRUE/FALSE needed
In addition: Warning message:
In diff(as.numeric(trajectory[, idIdx])) : NAs introduced by coercion
Am I failing in providing something that the function needs?
I am providing a data.frame with locations and timestamps, as required:
x y timestamp id
1 501658.0 4290020 2020-10-18 17:55:00 tag
2 505927.4 4293400 2020-10-18 18:25:00 tag
3 505914.5 4293368 2020-10-18 18:55:00 tag
4 499876.1 4287707 2020-10-18 10:25:00 tag
5 499794.4 4287576 2020-10-18 10:55:00 tag
6 499790.5 4287579 2020-10-18 11:25:00 tag
...
Similarly, I am providing a SpatialPolygons object such as:
An object of class "SpatialPolygons"
Slot "polygons":
[[1]]
An object of class "Polygons"
Slot "Polygons":
[[1]]
An object of class "Polygon"
Slot "labpt":
[1] 503510.9 4294866.7
Slot "area":
[1] 32165780
Slot "hole":
[1] FALSE
Slot "ringDir":
[1] 1
Slot "coords":
[,1] [,2]
[1,] 503886.7 4298520
[2,] 507815.9 4294444
[3,] 502844.6 4291035
[4,] 499396.6 4295706
[5,] 503886.7 4298520
Slot "plotOrder":
[1] 1
Slot "labpt":
[1] 503510.9 4294866.7
Slot "ID":
[1] "ID1"
Slot "area":
[1] 32165780
Slot "plotOrder":
[1] 1
Slot "bbox":
min max
x 499396.6 507815.9
y 4291034.9 4298519.7
Slot "proj4string":
CRS arguments: +proj=utm +zone=29 +ellps=WGS84
Thank you in advance!
getRecursionsInPolygon() returns the following error when trying to use with Move or MoveStack objects:
Error in as.difftime(revisitStats$timeSinceLastVisit) :
'tim' is not character or numeric
You will be aware, for example from:
https://r-spatial.org/r/2022/04/12/evolution.html,
https://r-spatial.org/r/2022/12/14/evolution2.html,
https://r-spatial.org/r/2023/04/10/evolution3.html and
https://rsbivand.github.io/csds_jan23/bivand_csds_ssg_230117.pdf and
perhaps view https://www.youtube.com/watch?v=TlpjIqTPMCA&list=PLzREt6r1NenmWEidssmLm-VO_YmAh4pq9&index=1
that rgdal
, rgeos
and maptools
will be retired this
year, in October 2023.
recurse
suggests rgeos
but does not pass CMD check when rgeos
is absent:
00check.log
Here CMD check was run in a scenario using sp evolution status 2 (substitute use of rgdal with sf for projection/transformation/CRS) and absence of retiring packages from the library path. Possibly the geos
package would provide mitigations; see also links from https://r-spatial.org/r/2023/04/10/evolution3.html for further hints. Please fix best by June, latest October 2023.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.