Edward Lavender*
*This repository is maintained by Edward Lavender (edward.lavender@eawag.ch).
This repository contains methods, written in
R and organised as an
RStudio
Project, supporting
Lavender et al. (in prep). Improving residency estimates in acoustic
telemetry systems with state-space models. This work is an extension of
Futia et al.’s (2024) analysis of heuristic residency metrics in
acoustic telemetry systems that includes state-space models fitted using
the patter
R package (and the
Julia backend
Patter.jl
).
The project forks Futia et al.’s
(2024) repository.
The project was built in R (version 4.4.1)
in RStudio and implements local dependency
management using
renv
.
The main project directories in this forked project are as follows:
-
dev/
contains project-management scripts.01-dev.R
and02-clone.R
are standarddv
scripts:01-dev.R
records project set up and development;02-clone.R
is used to clone the project (see ‘Instructions’);
-
data/
contains datasets. This includes the datasets provided by Futia et al. (2024) as well as:patter
contains input/output datasets forpatter
*;inst/
contains RStudio Project-management files generated bydv
:dependencies.rds
is a list of dependencies;session-info.rds
is a record of information about the R Session;tree.rds
is a record of the project directory tree (as generated bydv::use_template_tree()
indev/01-dev.R
, see below);
-
R/
contains R scripts (formerlyanalyses/
). Alongside Futia et al.’s (2024) code, this includes:patter_01_setup.R
which sets up datasets for analysis withpatter
;patter_02_exploration.R
which explores simulated datasets;patter_03_algorithms.R
which analyses simulated datasets using particle algorithms;patter_04_residency.R
which provides ‘quick’ residency metrics;
-
src/ contains R source code.
-
Julia/
is the Julia project directory. -
renv/
implements local dependency management for R.
- This directory is not currently available in the online version of this repository.
Follow the steps described below to clone the project and reproduce the workflow.
-
Clone the project via GitHub. Follow the instructions in
dev/02-clone.R
to install packages and directories:- Packages. Work through
dev/02-clone.R
to userenv
to regenerate the local project library. Packages can also be manually reinstalled via02-clone.R
. - Directories. Rebuild the project directory tree, via
dv::use_template_proj()
anddv::use_template_tree()
.
- Packages. Work through
-
Source (raw) data from the authors.
-
Implement analysis via relevant scripts (e.g.,
patter_*.R
).
Futia, M. et al. (2024). Modeling regional occupancy of fishes using acoustic telemetry: a model comparison framework applied to lake trout. Animal Biotelemetry, 12:25. https://doi.org/10.1186/s40317-024-00380-3
Lavender, E. et al. (in prep). Improving residency estimates in acoustic telemetry systems with state-space models.
Please note that this project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.