Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscra committed Mar 24, 2022
1 parent cee1293 commit 05dc8e1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion scripts/Crawford_abandonment_MS+SI.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,16 @@ load(file = paste0(p_derived2, "/decay_endpoints_files", run_label, ".rds"), ver
fitted_combo <- fitted_combo %>%
left_join(site_labels)
# load new extrapolation data:
# load new potential abandonment data:
potential_area_dat <- read_csv(file = paste0(p_derived2, "potential_area_dat", run_label, ".csv"))
potential_persistence_dat <- read_csv(file = paste0(p_derived2, "potential_persistence_dat", run_label, ".csv"))
# load carbon data:
site_carbon_df <- read_csv(file = paste0(p_derived2, "/carbon_df", run_label,".csv")) %>%
left_join(site_labels)
```

```{r misc-notes, eval = FALSE}
Expand Down
9 changes: 6 additions & 3 deletions scripts/_util/_util_files.R
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,12 @@ names(age_t_bins) <- site_df$site
# --- max_age of abandonment --- #
# ----------------------- #

max_age_t <- lapply(list.files(paste0(p_dat_derived, "max_age/", run_label), full.names = TRUE) %>%
grep(".tif", ., value = TRUE),
function(i) {terra::rast(i)})
max_age_t <- lapply(1:11, function(i) {
terra::rast(
paste0(p_dat_derived, "max_age/", run_label, "/",
site_df$site[i], "_max_age", run_label, ".tif")
)
})
names(max_age_t) <- site_df$site
for (i in seq_along(max_age_t)) {names(max_age_t[[i]]) <- "max_age"} # remember: these are just 1987:2017

Expand Down

0 comments on commit 05dc8e1

Please sign in to comment.