Skip to content
Closed
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1ddc2ae
moved rjags from Imports to Suggests
KevinSee Oct 18, 2024
c8c4c41
deleted jagsUI from the Suggested section in the DESCRIPTION
KevinSee Oct 21, 2024
458b811
dropped the need for jagsUI package
KevinSee Oct 21, 2024
e0129be
traded jagsUI for nimble packages in NAMESPACE
KevinSee Oct 21, 2024
891b009
added xfun to required package list
KevinSee Oct 22, 2024
eb3e2b0
updated several query functions. Switched from using httr to httr2 pa…
KevinSee Nov 7, 2024
585739c
allowed this function to take another PIT tag dam code
KevinSee Nov 7, 2024
993c0e9
re-formated some code to make it easier to read
KevinSee Nov 7, 2024
c519f4b
added a catch to set negative window counts to 0 (otherwise throws an…
KevinSee Nov 7, 2024
2e08005
removed need to show column types
KevinSee Nov 7, 2024
7375469
rewrote the wrapper function of compiling data and summarizing trap d…
KevinSee Nov 7, 2024
6888c5b
Merge pull request #35 from KevinSee/nimble
KevinSee Nov 7, 2024
bb5bf7c
use vroom instead of readr package. Added code to suppress warnings
KevinSee Nov 7, 2024
8d1d528
switched to use vroom instead of readr package. Added code to suppres…
KevinSee Nov 7, 2024
f0860ac
updated some of the column names to match output of queryPITtagObs()
KevinSee Nov 7, 2024
3029439
Merge branch 'develop' into nimble
KevinSee Nov 7, 2024
65845ed
Fixed a couple bugs that were referencing incorrect column names
KevinSee Nov 7, 2024
d3d376e
updated vignette to use compileData() function instead of compileGRAd…
KevinSee Nov 7, 2024
07a45df
Merge branch 'develop' into nimble
KevinSee Nov 7, 2024
5d5fa3f
write a script containing several NIMBLE models, and another to test …
KevinSee Nov 7, 2024
e431124
fixed a problem with column names. Now works for both Lower Granite a…
KevinSee Nov 7, 2024
25433f8
changed start_date to Start_Date in addTrapRate() to fix a join
mackerman44 Apr 16, 2025
bc1ae86
changed start_date to Start_Date in addTrapRate() to fix a join
KevinSee Apr 16, 2025
bde7c20
added project ID to .Rproj file
KevinSee Apr 16, 2025
28f3502
making compileGRAdata() to create start_date to match what is needed …
mackerman44 Jan 7, 2026
50f7d8c
needed to update trap_rate to also create start_date
mackerman44 Jan 7, 2026
09ad597
Merge remote-tracking branch 'origin/main' into develop
KevinSee Mar 27, 2026
bc62e68
Merge branch 'main' into develop
KevinSee Mar 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions R/compileGRAdata.R
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,15 @@ compileGRAdata = function(yr,
trap_rate = tagTrapRate(trap_dataframe = trap_yr,
week_strata = week_strata) %>%
# mutate(trap_open = ifelse(n_trap > 0, T, F)) %>%
left_join(tibble(Start_Date = lubridate::int_start(week_strata),
left_join(tibble(start_date = lubridate::int_start(week_strata),
week_num = 1:length(week_strata)), by = 'week_num') %>%
mutate(Start_Date = lubridate::ymd(Start_Date)) %>%
mutate(start_date = lubridate::ymd(start_date)) %>%
rename(n_trap_tags = n_trap,
n_poss_tags = n_tot, # include the tag counts going into trap rate calc.
trap_rate = rate,
trap_rate_se = rate_se) %>%
mutate(trap_open = if_else(n_trap_tags > 0, T, F)) %>%
select(Start_Date,
select(start_date,
week_num,
trap_open,
everything())
Expand All @@ -164,7 +164,7 @@ compileGRAdata = function(yr,
# add some error
trap_rate_se = trap_rate * trap_rate_cv) %>%
mutate(trap_open = if_else(trap_rate > 0, T, F)) %>%
select(Start_Date,
select(start_date = Start_Date,
week_num,
trap_open,
everything())
Expand Down Expand Up @@ -230,7 +230,7 @@ compileGRAdata = function(yr,
dam_weekly = dam_daily %>%
group_by(week_num) %>%
summarise(Species = unique(Species),
Start_Date = min(Date)) %>%
start_date = min(Date)) %>%
ungroup() %>%
left_join(dam_daily %>%
group_by(week_num) %>%
Expand All @@ -241,7 +241,7 @@ compileGRAdata = function(yr,
mutate_at(vars(win_cnt:n_invalid),
list(~ifelse(is.na(.), 0, .))), by = 'week_num') %>%
mutate(window_open = ifelse(win_cnt > 0, T, F)) %>%
select(Species, Start_Date, week_num, everything())
select(Species, start_date, week_num, everything())

if(incl_trapRate) {
dam_weekly = addTrapRate(dam_weekly,
Expand Down
Loading