Skip to content

Commit

Permalink
add species ids as names to partialy saved data
Browse files Browse the repository at this point in the history
  • Loading branch information
benj919 committed Jun 30, 2020
1 parent 55515ae commit 656af29
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions R/observations.R
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ save_extract <- function(element) {
save_landscape()
dir.create(file.path(config$directories$output, element), showWarnings = F, recursive = T)
tmp <- lapply(data$all_species, function(x){return(x[[element]])})
names(tmp) <- sapply(data$all_species, function(x){x$id})
saveRDS(object = tmp,
file = file.path(config$directories$output, element, paste0(element, "_t_", vars$ti, ".rds")))
}
Expand Down

0 comments on commit 656af29

Please sign in to comment.