Skip to content

Commit

Permalink
bm extract append data
Browse files Browse the repository at this point in the history
  • Loading branch information
ramarty committed Nov 4, 2024
1 parent 73c3c7a commit 916c79b
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions R/blackmarbler.R
Original file line number Diff line number Diff line change
Expand Up @@ -874,11 +874,25 @@ bm_extract <- function(roi_sf,
# Output dataframe when output_location_type = "file" ------------------------
if(output_location_type == "file"){
if(!file_return_null){
r <- file_dir %>%
list.files(full.names = T,
pattern = paste0("*.Rds")) %>%
str_subset(out_name_begin) %>%

print(out_name_begin)

## Output path
date_names <- define_date_name(date, product_id)

out_name_end <- paste0("_",
date_names,
".Rds")
out_name <- paste0(out_name_begin, out_name_end)

r <- file.path(file_dir, out_name) %>%
map_df(readRDS)

# r <- file_dir %>%
# list.files(full.names = T,
# pattern = paste0("*.Rds")) %>%
# str_subset(out_name_begin) %>%
# map_df(readRDS)
} else{
r <- NULL
}
Expand Down

0 comments on commit 916c79b

Please sign in to comment.