Git Product home page Git Product logo

flightr's Introduction

Wowchemy Website Builder

Academic Template for Hugo

The Hugo Academic ResumΓ© Template empowers you to create your job-winning online resumΓ© and showcase your academic publications.

Check out the latest demo of what you'll get in less than 10 minutes, or view the showcase.

Wowchemy makes it easy to create a beautiful website for free. Edit your site in Markdown, Jupyter, or RStudio (via Blogdown), generate it with Hugo, and deploy with GitHub or Netlify. Customize anything on your site with widgets, themes, and language packs.

Crowd-funded open-source software

To help us develop this template and software sustainably under the MIT license, we ask all individuals and businesses that use it to help support its ongoing maintenance and development via sponsorship.

Ecosystem

Screenshot

Demo image credits

Latest news

Analytics

flightr's People

Contributors

aurielfournier avatar eldarrak avatar jedgroev avatar jkaragicheva avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flightr's Issues

dependencies on retiring spatial infrastructure packages

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.

'maptools', 'rgdal', 'rgeos' are used, speciffically as found by pkgapi: maptools::gzAzimuth maptools::sunriset rgeos::gBuffer rgeos::gDistance rgeos::gSimplify rgeos::gUnion rgeos::gWithinDistance Please see https://r-spatial.org/r/2023/04/10/evolution3.html for links to possible substitutes, work is ongoing to keep maptools::sunriset active in some way.

Action is needed soon, best by June, latest by October 2023.

Error in make.calibration: could not find function "varExp"

packageVersion("FlightR")
[1] β€˜0.4.3’

I just started getting an error message when using the make.calibration command. All packages and R are updated and running fine otherwise. First time I’ve seen this error. I'm seeing it when rerunning tags (from saved files) and when running new tags.

Calibration.periods
calibration.start calibration.stop lon lat
2015-06-01 2015-09-01 -96.8224 39.2082

Calibration<-make.calibration(Proc.data.U357, Calibration.periods)
…
checking dusk 74
checking dusk 75
checking dusk 76
calibration method used: parametric.slope
estimating correction function...

Error in eval(expr, envir, enclos) : could not find function "varExp"

Problem with make.Calibration

Hi, I have set up my data for calibration as follows:

> head(FlightR.data)
                  datetime    light twilight interp excluded
1 2016-07-04T05:55:26.000Z 37211.01        0  FALSE    FALSE
2 2016-07-04T06:00:26.000Z 65118.41        0  FALSE    FALSE
3 2016-07-04T06:05:26.000Z 16280.45        0  FALSE    FALSE
4 2016-07-04T06:10:26.000Z 13954.84        0  FALSE    FALSE
5 2016-07-04T06:15:26.000Z 65118.41        0  FALSE    FALSE
6 2016-07-04T06:20:26.000Z 18606.07        0  FALSE    FALSE

And the calibration dataframe:

Calibration.periods<-data.frame(
        calibration.start=as.POSIXct(c("2016-07-04", "2017-06-21" )),
        calibration.stop =as.POSIXct(c("2016-07-22", "2017-07-01")),
        lon=177.05, 
        lat=62.55) 

When subsequently I attempt to create the calibration object as follows:

Calibration<-make.calibration(FlightR.data, 
                              Calibration.periods,
                              model.ageing = F, 
                              plot.final = T)

I get the following error:

Error in Twilight.time.mat.Calib.dawn[-25, ] : incorrect number of dimensions - I cannot find any reference to this on the internet.

Any help gratefully appreciated. Thanks.

Cutoff probability value leading to an error

Hello eldarrak,

I am writing to you about some error I am facing using FLightR 0.5.1.
I have got some troubles running the stationary.migration.summary() function with some prob.cutoff values.

In my particular example, I have no problem running the above mentioned function with prob.cutoff values of 0.2 and 0.4 but the function raises an error when running with a prob.cutoff of 0.3. I imagine how the function might not work with some cutoff probability values but the fact that higher and lower values work questions me.

More precisely, I get the error "$ operator is invalid for atomic vectors" when running the function with 0.3. This error seems to come from the get_time_boundaries() function. By looking a little bit more into the code details, it seems that this error comes from the fact that the Schedule object created in get_time_boundaries() function (as the result of find.times.distribution()) is at some point NA.

Do you have any idea why does this error happen?
Could this be something problematic?

I know the prob.cutoff values I am discussing are probably very high but they do not lead to a "bird likely did not move" scenario (and are not the ones I will be using in the end for my analyses).

Could I send you the result object I am currently working on so you could replicate my error (if you want/need to).

Thank you in advance for your answer,
Best regards,

Gaspard Baudrin

no application method for 'st_as_sf' applied to an object of class "c('matrix','array','double','numeric')"

Hello. I'm attempting to run the FlightR_analysis_workflow.Rmd example process. I made it all the way to the

stationary.migration.summar(Result, prob.cotoff = 0.1, min.say = 3)

The execution in the .Rmd file errors with the error I put in the title.

I'm using
R 4.1.3
packageVersion("FLightR")
[1] β€˜0.5.4’

FLightR::stationary.migration.summary()

I'd like to go through a "verification" test to make sure that all of the packages and their dependencies are installed and working before I attempt to use these tools for my samples. I'm using Lotek fLight FL6057 tags. I've made it to this function after the 40 minutes of processing. Not complaining but hope I can pick back up from the saved file to complete the workflow.

Thanks for your time,
Todd Eastman

Inconsistent Enforcement of the Spatial Mask

First, FlightR rocks and thank you Eldar for your tireless work on this package. What an awesome leap forward for geolocator analysis. I have been systematically working through the coding options in FlightR to better understand the underlying model, but I seem to be observing some behavior that I can’t understand in regards to onshore/offshore locations and the spatial mask. I am analyzing geolocator data from East Coast US Grasshopper Sparrows: a North American landbird that migrates to Florida and some of the Caribbean Islands. So I want to allow flights over water, but stationary periods over water are not possible.
However, when I export my results to ArcGIS and look at the movements, I am getting stationary periods over water >50 km from land. I understand that the spatial grid is 50x50 km, so a stationary period just offshore (in nearshore waters) is reasonable given the coarseness of the spatial grid.

Attempt 1: Do not allow stationary periods over water

Grid<-make.grid(left=-115, bottom=-10, right=-60, top=52,
distance.from.land.allowed.to.use=c(-Inf, 1500),probability.of.staying = 0,
distance.from.land.allowed.to.stay=c(-Inf, 0))
all.in<-make.prerun.object(Proc.data, Grid,start=c(-76.4181, 38.2942),end = NA,
Direction=180,)
Result.U337_NoWaterStay<-run.particle.filter(all.in,nParticles=1e6,known.last=FALSE,
check.outliers=T, b=750)

The blue box surrounds some of the points >50 km from land; these points represent 30 consecutive days).
nowater

When I check the spatial grid, I can confirm that there is a zero probability of staying there.

all.in$Spatial$Grid[5972,]
lon lat Stay
-81.63934 23.85000 0.00000
all.in$Spatial$Grid[5972,3]==0
Stay
TRUE

Plotting the grid (via make.grid(…..) also confirms that the mask β€˜looks’ right. A bird shouldn’t be able to hang out there for a month, I think.

Attempt 2: A more extreme example, do not allow ANY flight over water (>50 km from shore)

Grid<-make.grid(left=-115, bottom=-10, right=-60, top=52,
distance.from.land.allowed.to.use=c(-Inf, 0),probability.of.staying = 0,
distance.from.land.allowed.to.stay=c(-Inf, 0))

I understand that in this case the make.grid function resets the maximum distance.from.land.allowed.to.stay to 25 km,
head(getAnywhere(make.grid()))
…
if (distance.from.land.allowed.to.stay[2] < 25)
distance.from.land.allowed.to.stay[2] <- 25
…
But, I am still getting flights over water (>100 km offshore Florida) and short stationary periods over water. In this photo there’s a 4-day period of flight over water far from shore.

nowaterforreal

Perhaps I'm misunderstanding the "distance.from.land.allowed.to.stay" command. My understanding is that an animal cannot remain in that 50x50 km square for multiple twilight periods if I set probability.of.staying to zero for that square. Thanks for your help Eldar.

Error with tsoutliers on install

Tried to install and got following error:

install_github("eldarrak/FLightR")

Downloading GitHub repo eldarrak/FLightR@master
Installing FLightR
Skipping 1 packages not available: tsoutliers
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save --no-restore CMD INSTALL
'/private/var/folders/HJ/HJsTXtLSFq8pUyLOZ9ium++++TI/-Tmp-/Rtmp0UpYPb/devtools34477d800f6/eldarrak-FLightR-5478d1d'
--library='/Library/Frameworks/R.framework/Versions/3.2/Resources/library' --install-tests

ERROR: dependency β€˜tsoutliers’ is not available for package β€˜FLightR’

  • removing β€˜/Library/Frameworks/R.framework/Versions/3.2/Resources/library/FLightR’
    Error: Command failed (1)

I am running the following version of R in Rstudio:
version

          _                           

platform x86_64-apple-darwin10.8.0
arch x86_64
os darwin10.8.0
system x86_64, darwin10.8.0
status
major 3
minor 2.1
year 2015
month 06
day 18
svn rev 68531
language R
version.string R version 3.2.1 (2015-06-18)
nickname World-Famous Astronaut

Thoughts?

CheckForRemoteErrors Error in Make.prerun.object

I'm now getting a error in the new 0.4.5 version of FLightR related to the parallel/clustering, I believe.

Using the make.prerun.object command generates the following error:

all.in.smart.grid.U324<-make.prerun.object(Proc.data.U324, Smart.Grid.U324, start=c(lon.U324,lat.U324), end = NA, Calibration=Calibration.periods.U324,threads=-1)

likelihood correction turned off as no correction found in the calibration
making cluster
estimating dusks
Error in checkForRemoteErrors(val) :
23 nodes produced errors; first error: attempt to apply non-function

Where the # of nodes refers to the number of clusters I am attempting to use. Changing the threads default from -1 to 4 (for example) has no effect.

`make.prerun.object()` cluster initialization issue on SLURM cluster

make.prerun.object() cluster initialization issue

Running make.prerun.object() from the instructions on Chapter 8 of the Light-level geolocation analyses manual on a single node job on a Linux HPC cluster running SLURM fails with:

making cluster
Error in socketAccept(socket = socket, blocking = TRUE, open = "a+b",  : 
  all connections are in use
Calls: make.prerun.object ... get.Phys.Mat.parallel -> <Anonymous> -> makePSOCKcluster -> socketAccept
Execution halted

Cause

This happens because parallel::makeCluster() is called via mycl <- parallel::makeCluster(threads) and the cluster type is left as default "PSOCK".

The workaround to this is to allow a user to choose a cluster type and to initialize it correctly:

hosts <- rep("localhost",threads)
mycl <- parallel::makeCluster(hosts, type=cluster.type)

Reprex and session info

─ Session info ───────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.3.2 (2023-10-31)
 os       Rocky Linux 8.9 (Green Obsidian)
 system   x86_64, linux-gnu
 ui       X11
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       Europe/Amsterdam
 date     2024-06-04
 pandoc   NA

─ Packages ───────────────────────────────────────────────────────────────────
 package          * version    date (UTC) lib source
 bit              * 4.0.5      2022-11-15 [1] CRAN (R 4.3.2)
 bitops             1.0-7      2021-04-24 [1] CRAN (R 4.3.2)
 boot             * 1.3-30     2024-02-26 [1] CRAN (R 4.3.2)
 cachem             1.0.8      2023-05-01 [3] CRAN (R 4.3.2)
 callr              3.7.3      2022-11-02 [3] CRAN (R 4.3.2)
 changepoint        2.2.4      2022-11-03 [1] CRAN (R 4.3.2)
 CircStats        * 0.2-6      2018-07-01 [1] CRAN (R 4.3.2)
 circular         * 0.5-0      2023-09-05 [1] CRAN (R 4.3.2)
 class              7.3-22     2023-05-03 [1] CRAN (R 4.3.2)
 classInt           0.4-10     2023-09-05 [1] CRAN (R 4.3.2)
 cli                3.6.2      2023-12-11 [1] CRAN (R 4.3.2)
 coda               0.19-4.1   2024-01-31 [1] CRAN (R 4.3.2)
 codetools          0.2-20     2024-03-31 [1] CRAN (R 4.3.2)
 colorspace         2.1-0      2023-01-23 [1] CRAN (R 4.3.2)
 crayon             1.5.2      2022-09-29 [3] CRAN (R 4.3.2)
 curl               5.2.1      2024-03-01 [1] CRAN (R 4.3.2)
 DBI                1.2.3      2024-06-02 [1] CRAN (R 4.3.2)
 devtools         * 2.4.5      2022-10-11 [3] CRAN (R 4.3.2)
 digest           * 0.6.35     2024-03-11 [1] CRAN (R 4.3.2)
 dotCall64          1.1-1      2023-11-28 [1] CRAN (R 4.3.2)
 dplyr              1.1.4      2023-11-17 [1] CRAN (R 4.3.2)
 e1071              1.7-14     2023-12-06 [1] CRAN (R 4.3.2)
 ellipsis           0.3.2      2021-04-29 [3] CRAN (R 4.3.2)
 fansi              1.0.6      2023-12-08 [1] CRAN (R 4.3.2)
 fastmap            1.1.1      2023-02-24 [3] CRAN (R 4.3.2)
 fields           * 15.2       2023-08-17 [1] CRAN (R 4.3.2)
 FLightR          * 0.5.5      2024-06-03 [1] Github (Neves-P/FLightR@7229a94)
 forecast         * 8.22.0     2024-03-04 [1] CRAN (R 4.3.2)
 foreign            0.8-86     2023-11-28 [2] CRAN (R 4.3.2)
 fracdiff           1.5-3      2024-02-01 [1] CRAN (R 4.3.2)
 fs                 1.6.4      2024-04-25 [1] CRAN (R 4.3.2)
 generics           0.1.3      2022-07-05 [1] CRAN (R 4.3.2)
 GeoLight         * 2.1.0      2024-05-28 [1] Github (SLisovski/GeoLight@360c909)
 GeoLocTools      * 0.1.0      2024-05-28 [1] Github (SLisovski/GeoLocTools@4455410)
 geosphere        * 1.5-18     2022-11-15 [1] CRAN (R 4.3.2)
 ggmap            * 4.0.0      2023-11-19 [1] CRAN (R 4.3.2)
 ggplot2          * 3.5.1      2024-04-23 [1] CRAN (R 4.3.2)
 glue               1.7.0      2024-01-09 [1] CRAN (R 4.3.2)
 gtable             0.3.5      2024-04-22 [1] CRAN (R 4.3.2)
 htmltools          0.5.8.1    2024-04-04 [1] CRAN (R 4.3.2)
 htmlwidgets        1.6.4      2023-12-06 [1] CRAN (R 4.3.2)
 httpuv             1.6.15     2024-03-26 [1] CRAN (R 4.3.2)
 httr               1.4.7      2023-08-15 [3] CRAN (R 4.3.2)
 jpeg               0.1-10     2022-11-29 [1] CRAN (R 4.3.2)
 jsonlite           1.8.8      2023-12-04 [1] CRAN (R 4.3.2)
 KernSmooth         2.23-24    2024-05-17 [1] CRAN (R 4.3.2)
 later              1.3.2      2023-12-06 [1] CRAN (R 4.3.2)
 lattice            0.22-6     2024-03-20 [1] CRAN (R 4.3.2)
 lifecycle          1.0.4      2023-11-07 [1] CRAN (R 4.3.2)
 lmtest             0.9-40     2022-03-21 [1] CRAN (R 4.3.2)
 magrittr           2.0.3      2022-03-30 [3] CRAN (R 4.3.2)
 mapdata          * 2.3.1      2022-11-01 [1] CRAN (R 4.3.2)
 maps             * 3.4.2      2023-12-15 [1] CRAN (R 4.3.2)
 maptools         * 1.1-8      2023-07-18 [2] CRAN (R 4.3.2)
 MASS             * 7.3-59     2023-04-21 [1] CRAN (R 4.3.2)
 memoise            2.0.1      2021-11-26 [3] CRAN (R 4.3.2)
 mime               0.12       2021-09-28 [3] CRAN (R 4.3.2)
 miniUI             0.1.1.1    2018-05-18 [3] CRAN (R 4.3.2)
 munsell            0.5.1      2024-04-01 [1] CRAN (R 4.3.2)
 mvtnorm            1.2-5      2024-05-21 [1] CRAN (R 4.3.2)
 ncdf4            * 1.22       2023-11-28 [2] CRAN (R 4.3.2)
 nlme               3.1-164    2023-11-27 [1] CRAN (R 4.3.2)
 nnet               7.3-19     2023-05-03 [1] CRAN (R 4.3.2)
 paletteer          1.6.0      2024-01-21 [1] CRAN (R 4.3.2)
 patchwork          1.2.0      2024-01-08 [1] CRAN (R 4.3.2)
 pillar             1.9.0      2023-03-22 [3] CRAN (R 4.3.2)
 pkgbuild           1.4.2      2023-06-26 [3] CRAN (R 4.3.2)
 pkgconfig          2.0.3      2019-09-22 [3] CRAN (R 4.3.2)
 pkgload            1.3.3      2023-09-22 [3] CRAN (R 4.3.2)
 plyr               1.8.9      2023-10-02 [1] CRAN (R 4.3.2)
 png                0.1-8      2022-11-29 [1] CRAN (R 4.3.2)
 PolarGeolocation * 0.1.0      2024-05-28 [1] Github (SLisovski/PolarGeolocation@6f321f0)
 prettyunits        1.2.0      2023-09-24 [3] CRAN (R 4.3.2)
 probGLS          * 0.9.7      2024-05-28 [1] Github (benjamin-merkel/probGLS@e92cd33)
 processx           3.8.2      2023-06-30 [3] CRAN (R 4.3.2)
 profvis            0.3.8      2023-05-02 [3] CRAN (R 4.3.2)
 promises           1.3.0      2024-04-05 [1] CRAN (R 4.3.2)
 proxy              0.4-27     2022-06-09 [1] CRAN (R 4.3.2)
 ps                 1.7.5      2023-04-18 [3] CRAN (R 4.3.2)
 purrr              1.0.2      2023-08-10 [3] CRAN (R 4.3.2)
 quadprog           1.5-8      2019-11-20 [1] CRAN (R 4.3.2)
 quantmod           0.4.26     2024-02-14 [1] CRAN (R 4.3.2)
 R6                 2.5.1      2021-08-19 [3] CRAN (R 4.3.2)
 raster           * 3.6-26     2023-10-14 [2] CRAN (R 4.3.2)
 Rcpp             * 1.0.12     2024-01-09 [1] CRAN (R 4.3.2)
 RcppArmadillo    * 0.12.8.4.0 2024-05-31 [1] CRAN (R 4.3.2)
 rematch2           2.1.2      2020-05-01 [3] CRAN (R 4.3.2)
 remotes            2.4.2.1    2023-07-18 [3] CRAN (R 4.3.2)
 rgdal            * 1.6-7      2023-05-31 [2] CRAN (R 4.3.2)
 rgeos            * 0.6-4      2023-07-18 [2] CRAN (R 4.3.2)
 rlang              1.1.3      2024-01-10 [1] CRAN (R 4.3.2)
 rnaturalearth      1.0.1      2023-12-15 [1] CRAN (R 4.3.2)
 scales             1.3.0      2023-11-28 [1] CRAN (R 4.3.2)
 sessioninfo        1.2.2      2021-12-06 [1] CRAN (R 4.3.2)
 sf               * 1.0-16     2024-03-24 [1] CRAN (R 4.3.2)
 SGAT             * 0.1.3      2024-05-28 [1] Github (SWotherspoon/SGAT@d089484)
 shiny              1.8.1.1    2024-04-02 [1] CRAN (R 4.3.2)
 sp               * 2.1-4      2024-04-30 [1] CRAN (R 4.3.2)
 spam             * 2.10-0     2023-10-23 [1] CRAN (R 4.3.2)
 stringi            1.8.4      2024-05-06 [1] CRAN (R 4.3.2)
 stringr            1.5.1      2023-11-14 [1] CRAN (R 4.3.2)
 svglite          * 2.1.3      2023-12-08 [1] CRAN (R 4.3.2)
 systemfonts        1.0.5      2023-10-09 [3] CRAN (R 4.3.2)
 terra            * 1.7-78     2024-05-22 [1] CRAN (R 4.3.2)
 tibble             3.2.1      2023-03-20 [3] CRAN (R 4.3.2)
 tidyr              1.3.1      2024-01-24 [1] CRAN (R 4.3.2)
 tidyselect         1.2.1      2024-03-11 [1] CRAN (R 4.3.2)
 timeDate           4032.109   2023-12-14 [1] CRAN (R 4.3.2)
 truncnorm        * 1.0-9      2023-03-20 [1] CRAN (R 4.3.2)
 tseries            0.10-56    2024-05-14 [1] CRAN (R 4.3.2)
 TTR                0.24.4     2023-11-28 [1] CRAN (R 4.3.2)
 TwGeos           * 0.1.2      2024-05-28 [1] Github (SLisovski/TwGeos@028f499)
 units              0.8-5      2023-11-28 [2] CRAN (R 4.3.2)
 urca               1.3-4      2024-05-27 [1] CRAN (R 4.3.2)
 urlchecker         1.0.1      2021-11-30 [3] CRAN (R 4.3.2)
 usethis          * 2.2.2      2023-07-06 [3] CRAN (R 4.3.2)
 utf8               1.2.4      2023-10-22 [3] CRAN (R 4.3.2)
 vctrs              0.6.5      2023-12-01 [1] CRAN (R 4.3.2)
 viridisLite      * 0.4.2      2023-05-02 [1] CRAN (R 4.3.2)
 withr              3.0.0      2024-01-16 [1] CRAN (R 4.3.2)
 xtable             1.8-4      2019-04-21 [3] CRAN (R 4.3.2)
 xts                0.13.2     2024-01-21 [1] CRAN (R 4.3.2)
 zoo              * 1.8-12     2023-04-13 [1] CRAN (R 4.3.2)

 [1] /home4/p282067/R/x86_64-pc-linux-gnu-library/4.3
 [2] /cvmfs/hpc.rug.nl/versions/2023.01/rocky8/x86_64/amd/zen3/software/R-bundle-CRAN/2023.12-foss-2023a
 [3] /cvmfs/hpc.rug.nl/versions/2023.01/rocky8/x86_64/amd/zen3/software/R/4.3.2-gfbf-2023a/lib64/R/library

──────────────────────────────────────────────────────────────────────────────

Running a SLURM job with settings:

#SBATCH --nodes=1
#SBATCH --cpus-per-task=4
#SBATCH --mem=12GB

Rscript myscript.R

With myscript.R:

print(Sys.time())
url <- "https://github.com/slisovski/TheGeolocationManual/raw/master/download.zip"

temp <- tempfile()
download.file(url, temp)
unzip(temp, exdir = "data")

library(GeoLocTools)
setupGeolocation()

ID <- "M034"
wd <- "data"
Species <- "LanCol"

lon.calib <- 12.33
lat.calib <- 55.98

message("reading file")
raw <- readMTlux(paste0(wd, "/RawData/", Species, "/", ID, ".lux"))
names(raw) <- c("Date", "Light")
raw$Light  <- log(raw$Light+0.0001) + abs(min(log(raw$Light+0.0001)))
head(raw)

offset <- 12 # adjusts the y-axis to put night (dark shades) in the middle

### Looking at the raw data
message("Looking at the raw data")
lightImage( tagdata = raw,
            offset = offset,
            zlim = c(0, 10))

### Getting the twilight annotation
message("Getting the twilight annotation")
FLightR.data<-get.tags.data(paste0(wd, "/Results/", Species, "/", ID, "_twl.csv"))

#### Calibration ####
message("Calibration")
Calibration.periods<-data.frame(
  calibration.start=as.POSIXct(c(NA, '2015-05-15')),
  calibration.stop=as.POSIXct(c('2014-07-15', NA)),
  lon=lon.calib, lat=lat.calib)
# use c() also for the geographic coordinates,
# if you have more than one calibration location
# (e. g.,  lon=c(5.43, 6.00), lat=c(52.93,52.94))
print(Calibration.periods)

Calibration<-make.calibration(FLightR.data, Calibration.periods, model.ageing=TRUE, plot.final = T)

#### Spatial extent ####
message("Spatial extent")
Grid <- make.grid(left=5, bottom=-33, right=50, top=60,
                  distance.from.land.allowed.to.use=c(-Inf, 200),
                  distance.from.land.allowed.to.stay=c(-Inf, 50))

#### Preparing model run ####
# ~ 15 min run time
cpu <- as.numeric(Sys.getenv("SLURM_CPUS_ON_NODE", 1))
message("cpus: ", cpu)
all.in <- make.prerun.object(FLightR.data, Grid, start=c(lon.calib, lat.calib),
                             Calibration=Calibration, M.mean=750, threads = cpu)

On a compute node with two AMD 7763 (hence 128 cores total).

run.particle.filter Error Warnings

options(nwarnings = 10000)
Result.S752<-run.particle.filter(all.in,nParticles=1e6,known.last=FALSE, check.outliers=T,b=500)

Produces 800+ warnings, alternating between
In Current.Weights[Index.Stable] * in.Data$Spatial$Behav.mask[New.Particles] : longer object length is not a multiple of shorter object length

and

In pf.run.parallel.SO.resample(in.Data = all.out, threads = Threads, ... :
number of items to replace is not a multiple of replacement length

I've gotten these error warnings with the first four birds that I have processed. Changing the settings for outlier detection, nParticles or b doesn't halt the warnings. Is it safe to ignore these warnings? The results look reasonable. Thank you.

ERROR: dependency 'ggsn' is not available for package 'FLightR'

Dear Eldar,

I am trying to use the latest FlightR version. However, I get this error message:

devtools::install_github("eldarrak/FLightR", lib = "C:/Program Files/R/R-4.3.1/library/")
Downloading GitHub repo eldarrak/FLightR@HEAD
Skipping 1 packages not available: ggsn
── R CMD build ───────────────────────────────────────────────────────────────────────────────
βœ” checking for file 'C:...\AppData\Local\Temp\Rtmpq6f6La\remotes1eb07525652e\eldarrak-FLightR-b74b3b5/DESCRIPTION' (506ms)
─ preparing 'FLightR': (492ms)
βœ” checking DESCRIPTION meta-information ...
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ looking to see if a 'data/datalist' file should be added
─ building 'FLightR_0.5.5.tar.gz'
ERROR: dependency 'ggsn' is not available for package 'FLightR'
removing 'C:/Program Files/R/R-4.3.1/library/FLightR'
Warnmeldung:
In i.p(...) :
Installation des Pakets β€˜C:/.../AppData/Local/Temp/Rtmpq6f6La/file1eb019427c29/FLightR_0.5.5.tar.gz’ hatte Exit-Status ungleich 0

Is it just me or is this a general issue? Is there an easy way arround?

Thank you for your help in advance & best wishes,
Christoph

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.