Comments (6)
from animotum.
Hi, You'll have to include the code you are using & some example data that reproduces the error. Without this, I can only guess at what's causing the problem.
Thanks, Ian
from animotum.
from animotum.
Ok, half-way there. You will have to save your data as a .csv file (eg. using write.csv
within R, generate a .csv file from your excel spreadsheet, etc...) and attach it to your reply using the "paperclip" icon at the top right of the "Add a comment" window. Once I have your data then I can reproduce the error and determine what is going wrong.
from animotum.
Sorry, I replied to the email with the attachment, I guess that doesn't work!
from animotum.
There are a few issues going on here. First, you have a mix of uppercase and lowercase variable names so you either have to edit these so they are all lowercase prior to using aniMotum
functions or you have to call format_data()
and provide the exact variable names, eg:
data <- aniMotum::format_data(BermudaChloe, date = "Date", coord = c("lon", "Lat"))
But this also results in an error because you have missing entries, not classed as NA's
in the Date
variable:
d$Date
[1] "2017-08-13 23:35:40" "2017-08-14 10:00:09" "2017-08-15 09:14:24" "2017-08-15 10:17:39" "2017-08-15 10:44:45" "2017-08-16 02:00:38" "2017-08-16 09:03:25" "2017-08-16 22:00:01"
[9] "2017-08-16 22:00:01" "2017-08-17 07:09:34" "2017-08-17 09:11:36" "2017-08-17 10:29:04" "2017-08-17 10:29:04" "2017-08-17 21:43:33" "2017-08-18 21:03:09" "2017-08-19 02:36:02"
[17] "2017-08-19 09:34:01" "2017-08-19 19:52:10" "2017-08-20 02:16:22" "2017-08-20 10:55:15" "2017-08-20 22:53:11" "" "" ""
[25] "" "2017-08-25 21:42:11" "2017-08-25 21:59:54" "2017-08-25 22:23:26" "2017-08-26 01:01:35" "2017-08-26 07:10:59" "2017-08-26 09:39:09" "2017-08-26 22:54:58"
[33] "2017-08-26 23:35:07" "2017-08-27 08:38:59" "2017-08-27 09:09:41" "2017-08-27 11:45:22" "2017-08-27 22:35:36" "2017-08-27 23:07:18" "" ""
[41] "2017-08-30 21:20:28" "2017-08-30 22:35:10" "2017-08-30 22:57:21" "2017-08-30 23:05:32" "2017-08-31 08:00:28" "2017-08-31 08:37:00" "2017-08-31 13:21:40" "2017-08-31 20:52:19"
[49] "2017-08-31 20:52:19" "2017-08-31 22:31:13" "2017-09-01 07:44:57" "2017-09-01 23:44:14" "2017-09-02 00:18:55" "2017-09-02 23:57:48" "2017-09-03 10:23:45" "2017-09-03 21:52:22"
[57] "2017-09-03 23:04:09" "2017-09-04 02:56:34" "2017-09-04 08:18:46" "2017-09-04 09:42:21" "2017-09-04 18:28:16" "2017-09-04 20:13:17" "2017-09-04 21:40:34" "2017-09-04 23:16:30"
[65] "2017-09-05 09:29:58" "" "2017-09-07 10:02:28" "" "" "" "" ""
[73] "" "" "" "" "" "2017-09-18 01:26:47" "2017-09-18 19:11:10" "2017-09-18 23:59:59"
[81] "2017-09-19 23:04:55" "2017-09-20 02:24:18" "" "" "" "" "" ""
[89] "" "" "" "" "2017-10-01 00:11:53" "2017-10-01 23:12:49" "" ""
[97] "" "" "" "" "" "" "" ""
[105] "" "" "" "" "" "" "" ""
[113] "" "2017-10-21 10:33:03" "" ""
So you need to remove these, as all other variables apart from id
are NA. Then you can run format_data()
, and then fit the SSM:
d <- subset(BermudaChloe, Date != "")
data <- aniMotum::format_data(d, date = "Date", coord = c("lon", "Lat"))
fit <- aniMotum::fit_ssm(data, max = 4, model = "mp", time.step = 24)
plot(fit, "p")
But this shows that you have a few fairly large data gaps, which can be problematic for estimating sensible locations and move persistence. Finally, the first and last observed locations are substantially far away from the rest of the observed locations - you can see these in the x and y plot panels above, and both in the map below. Suggesting that these observations may be erroneous (highlighted in red):
aniMotum::map(fit, what = "f")
Hope this helps
from animotum.
Related Issues (20)
- min.dt likely not working as intended HOT 13
- map fit_ssm HOT 1
- when none of the input locations from any of the tracks are on land, route_path fails HOT 1
- installation and library(aniMotum) on M2 MBP HOT 4
- Package `foieGras` archived on CRAN and will be removed from the Tracking CTV HOT 1
- error with map function HOT 1
- When running function fit_ssm : Error in MakeADFun. Is someone familiar? HOT 2
- errors when running fit_ssm in animotum HOT 8
- Issue in installing foieGras package in RStudio HOT 3
- Error in if (p.GL > 0.75) { : missing value where TRUE/FALSE needed HOT 5
- not sure if bug or system issue HOT 3
- Error with sim_fit() using different gradient raster HOT 9
- rep$pdHess : $ operator is invalid for atomic vector — Error when fitting ssm HOT 9
- Error in strsplit(names(map), "_") : non-character argument HOT 1
- osar function not finishing the run HOT 2
- Missing packages for Mac M1 binary? HOT 3
- Issue with grad object for sim_fit() HOT 1
- manual download binary version animotum HOT 1
- Error when fitting an example fit_ssm: Error in updateCholesky(L, hessian.random) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from animotum.