forked from mfutia/model_comparison
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
76 lines (46 loc) · 4.77 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
title: Estimating residency in acoustic telemetry systems
author: Edward Lavender*
output: github_document
---
[![Project Status: Active -- The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
^\*^This repository is maintained by Edward Lavender (edward.lavender@eawag.ch).
# Introduction
This repository contains methods, written in [R](https://www.r-project.org/) and organised as an [RStudio](https://www.rstudio.com/) [Project](https://r4ds.had.co.nz/workflow-projects.html), 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`](https://github.com/edwardlavender/patter) [R](https://www.r-project.org/) package (and the [Julia](https://julialang.org) backend [`Patter.jl`](https://github.com/edwardlavender/Patter.jl)).
# Description
## Dependencies
The project forks Futia et al.'s ([2024]([https://github.com/mfutia/model_comparison])) repository. The project was built in [R](https://www.r-project.org/) (version `r paste0(version$major, ".", version$minor)`) in [RStudio](https://www.rstudio.com/) and implements local dependency management using [`renv`](https://rstudio.github.io/renv/articles/renv.html).
## Directories
The main project directories in this forked project are as follows:
1. **`dev/`** contains project-management scripts.
- `01-dev.R` and `02-clone.R` are standard [`dv`](https://github.com/edwardlavender/dv) scripts:
- `01-dev.R` records project set up and development;
- `02-clone.R` is used to clone the project (see 'Instructions');
2. **`data/`** contains datasets. This includes the datasets provided by Futia et al. ([2024]([https://github.com/mfutia/model_comparison])) as well as:
- `patter` contains input/output datasets for [`patter`](https://github.com/edwardlavender/patter)*;
- `inst/` contains [RStudio](https://www.rstudio.com/) [Project](https://r4ds.had.co.nz/workflow-projects.html)-management files generated by [`dv`](https://github.com/edwardlavender/dv):
- `dependencies.rds` is a list of dependencies;
- `session-info.rds` is a record of information about the [R](https://www.r-project.org/) Session;
- `tree.rds` is a record of the project directory tree (as generated by `dv::use_template_tree()` in `dev/01-dev.R`, see below); <br/>
3. **`R/`** contains [R](https://www.r-project.org/) scripts (formerly `analyses/`). Alongside Futia et al.'s ([2024]([https://github.com/mfutia/model_comparison])) code, this includes:
- `patter_01_setup.R` which sets up datasets for analysis with [`patter`](https://github.com/edwardlavender/patter);
- `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;
4. **src/** contains [R](https://www.r-project.org/) source code.
5. **`Julia/`** is the [Julia](https://julialang.org) project directory.
6. **`renv/`** implements local dependency management for [R](https://www.r-project.org/).
* This directory is not currently available in the online version of this repository.
# Instructions
Follow the steps described below to clone the project and reproduce the workflow.
1. **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 use [`renv`](https://rstudio.github.io/renv/articles/renv.html) to regenerate the local project library. Packages can also be manually reinstalled via `02-clone.R`.
- **Directories.** Rebuild the project directory tree, via `dv::use_template_proj()` and `dv::use_template_tree()`.
2. **Source (raw) data** from the authors.
5. **Implement analysis** via relevant scripts (e.g., `patter_*.R`).
# Citations
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.
# Code of conduct
Please note that this project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
------------------------------------------------------------------------