Skip to content

Commit 37c3fcd

Browse files
authored
Merge pull request #16 from trackyverse/build-functions
Build functions
2 parents aaf582f + 51ed5a5 commit 37c3fcd

35 files changed

Lines changed: 2550 additions & 129 deletions

.Rbuildignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
^\.Rproj\.user$
33
^vignettes/precompile\.R$
44
^vignettes/_Estimate_COA_vignette\.Rmd$
5+
^vignettes/_ps_estimate_coa_vignette\.Rmd$
56
^LICENSE\.md$
67
^\.github$
78
^Dockerfile$
@@ -11,4 +12,6 @@
1112
^pkgdown$
1213
^CNAME$
1314
^air\.toml$
14-
^src/StanExports_*
15+
^src/StanExports_*
16+
^[.]?air[.]toml$
17+
^\.vscode$

DESCRIPTION

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: TelemetrySpace
2-
Version: 1.3.1
2+
Version: 1.3.2
33
Title: Spatial point process and random field models for electronic tagging data
44
Description: A collection of tools to fit spatial models to several types of telemetry data. Models are provided to account for the detection process when estimating individual centers of activity from acoustic telemetry data and to incorporate data from stationary test transmitters when available. Bayesian versions of models are fitted using Stan (http://mc-stan.org/). Maximum likelihood versions are fitted using Template Model Builder (https://kaskr.github.io/adcomp/index.html).
55
Authors@R: c(
@@ -16,11 +16,13 @@ Depends:
1616
Imports:
1717
cli,
1818
dplyr,
19+
lubridate,
1920
methods,
2021
RcppParallel (>= 5.0.1),
2122
rlang,
2223
rstan (>= 2.18.1),
2324
rstantools (>= 2.4.0),
25+
sf,
2426
stats
2527
Suggests:
2628
ggplot2,
@@ -49,3 +51,4 @@ Roxygen: list(markdown = TRUE)
4951
URL: https://telemetryspace.trackyverse.org, https://github.com/trackyverse/TelemetrySpace
5052
BugReports: https://github.com/trackyverse/TelemetrySpace/issues
5153
Config/roxygen2/version: 8.0.0
54+
RoxygenNote: 8.0.0

NAMESPACE

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
export(COA_Standard)
44
export(COA_TagInt)
55
export(COA_TimeVarying)
6+
export(build_aeqd)
7+
export(build_bbox)
8+
export(build_counts)
9+
export(build_init)
10+
export(build_ntrans)
11+
export(build_pixel_grid)
12+
export(build_rec_coords)
13+
export(build_time_bin)
14+
export(build_tstep)
615
export(distf)
716
import(Rcpp)
817
import(methods)

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# TelemetrySpace 1.3
2+
## 1.3.2
3+
- `build_*()` functions have been added which streamlines the data processing prior to the models ([PR #16](https://github.com/trackyverse/TelemetrySpace/pull/16)). Unit tests have been written for these functions and a small vignette which will need to be further development has been initially made.
4+
25
## 1.3.1
36
- Code refactor ([PR #13](https://github.com/trackyverse/TelemetrySpace/pull/13)): leverage [Stan's "Includes" framework](https://mc-stan.org/docs/reference-manual/includes.html) to reduce redundant code across files.
47

R/COA_Tag_Integrated.R

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,6 @@ COA_TagInt <- function(
6666
exp_len <- expected_lengths(recX = recX, recY = recY, ntest_len = ntest)
6767

6868
validate_standata(standata, exp_len)
69-
# set rstan options
70-
rstan::rstan_options(auto_write = TRUE)
71-
# set coores - this probably should be an argument
72-
options(mc.cores = parallel::detectCores())
73-
7469
# fit model
7570
if (decay == "gaussian") {
7671
fit_model <- rstan::sampling(

R/COA_TimeVarying.R

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ COA_TimeVarying <- function(
5454

5555
validate_standata(standata, exp_len)
5656

57-
# set rstan options
58-
rstan::rstan_options(auto_write = TRUE)
59-
# set coores - this probably should be an argument
60-
options(mc.cores = parallel::detectCores())
61-
6257
# fit model
6358
if (decay == "gaussian") {
6459
fit_model <- rstan::sampling(

R/COA_standard.R

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ COA_Standard <- function(
5555

5656
validate_standata(standata, exp_len)
5757

58-
# set rstan options
59-
rstan::rstan_options(auto_write = TRUE)
60-
# set coores - this probably should be an argument
61-
options(mc.cores = parallel::detectCores())
62-
6358
# fit model
6459
if (decay == "gaussian") {
6560
fit_model <- rstan::sampling(

0 commit comments

Comments
 (0)