rbms, we aim to facilitate the implementation of statistical and mathematical methods developed for computing relative abundance indices from yearly time-series of butterfly counts. These data are characterised by temporal patterns (phenology) that must be accounted for when deriving abundance from a time-series of counts. As a toolbox, we plan to implement more methods to compute and visualise metrics as they develop. The rbms package will provide the option of being coupled and work in line with other tools available and developed by the community (e.g. rtrim, BRCindicators). With the development of the ‘rbms’ R package, we also provide a tutorial to facilitate its usage and understanding.
rbms implements methods that were developed independently and for which the source should be cited, users should also cite the
rbms package and its version to ensure appropriate referencing and improve the reproducibility of the work.
Schmucki R., Harrower C.A., Dennis E.B. (2021) rbms: Computing generalised abundance indices for butterfly monitoring count data. R package version 1.1.0. https://github.com/RetoSchmucki/rbms
Once the R programming system is successfully installed, you can install the
rbms package from GitHub. For this you will need to install the package
remotes, both available on CRAN. Once installed, use the function
devtools::install_github() to install the
rbms package on your system.
rbmsis build with R > 3.6.0, so you might need to update your R system before installation. To install devtools on Windows system, you will also need to install Rtools - note Rtools40 for R 4.x.x New to
Ror want to refresh your R coding skills, try the excellent tutorials available at ourcodingclub 👍
Consult the tutorial vignettes / Articles to learn about
rbms data format and the workflow how to compute flight curves, abundance indices, and collated index with a bootstrap confidence interval
Further documentation is also available through the help function in R or from the rbms online references
Version v.1.1.0 is likely to perform better with species having sparse data, potentially resulting in more flight curves and indices being computed. This version implements a basic plot method for “pheno_curve”, using the object produced by the
flight_curve() function as an argument.
# usage or plot method library(rbms) data(m_visit) data(m_count) ts_date <- rbms::ts_dwmy_table(InitYear = 2000, LastYear = 2003, WeekDay1 = 'monday') ts_season <- rbms::ts_monit_season(ts_date, StartMonth = 4, EndMonth = 9, StartDay = 1, EndDay = NULL, CompltSeason = TRUE, Anchor = TRUE, AnchorLength = 2, AnchorLag = 2, TimeUnit = 'w') ts_season_visit <- rbms::ts_monit_site(m_visit, ts_season) ts_season_count <- rbms::ts_monit_count_site(ts_season_visit, m_count, sp = 2) ts_flight_curve <- rbms::flight_curve(ts_season_count, NbrSample = 300, MinVisit = 5, MinOccur = 3, MinNbrSite = 5, MaxTrial = 4, GamFamily = 'nb', SpeedGam = FALSE, CompltSeason = TRUE, SelectYear = NULL, TimeUnit = 'w') ## Flight curves are in the "pheno" data.table located within the ts_flight_curve result that is a list str(ts_flight_curve$pheno) ## Basic plot method to plot flight curve plot(ts_flight_curve) points(ts_flight_curve, col = 'magenta', pch = 19) # for a single year plot(ts_flight_curve, year = 2002) points(ts_flight_curve, year = 2002, col = 'magenta', pch = 19)
For reporting issues related to this package or workflow, please visit the issue and before opening a new, see if your problem is not already in the list reported issues here