Skip to content

Commit

Permalink
Added March
Browse files Browse the repository at this point in the history
Merge branch 'master' of https://github.com/BigelowLab/calanus-for-whales

# Conflicts:
#	Code/build_gam.R
  • Loading branch information
Camille Ross authored and Camille Ross committed Jan 13, 2021
2 parents ef54edf + a204102 commit 754242f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions Code/build_brt_dismo.R
Expand Up @@ -152,8 +152,7 @@ build_brt <- function(version, fp_md, species, fp_covars, env_covars, threshold,
# test <- month_md[!duplicated(rbind(train, month_md))[-(1:nrow(train))],]
#
env_covars <- c(
"bat",
"bots", "bott"
"bat"
)

# -------- Build BRT with all covariates --------
Expand Down
10 changes: 5 additions & 5 deletions Code/build_gam.R
Expand Up @@ -136,7 +136,7 @@ build_gam <- function(version, fp_md, datasets, fp_covars, env_covars, years, fp
print(paste0("Year: ", i, ", Month: ", j))

# -------- Isolate month data --------
month_md <- md %>% dplyr::filter(month == 3) %>%
month_md <- md %>% dplyr::filter(month == 1) %>%
mutate(abund = if_else(abund < threshold, 0, 1))

# -------- Check for unique values and number of rows --------
Expand All @@ -145,10 +145,10 @@ build_gam <- function(version, fp_md, datasets, fp_covars, env_covars, years, fp
# next
# }

env_covars <- c(
"slope"

)
env_covars <- c("wind", "fetch", "uv",
"bat", "dist", "slope",
"bots", "bott", "sss",
"sst", "lag_sst", "chl", "int_chl")

env_covars_fun <- paste0("s(", env_covars, ", k = gam_args[['k']], bs = gam_args[['bs']])")

Expand Down

0 comments on commit 754242f

Please sign in to comment.