Commit 820627e8 authored by LDalby's avatar LDalby
Browse files

Checked and it works, so we can drop the file_name column.

parent 7bc2ec95
......@@ -27,7 +27,8 @@ path(path_to_dirs, glue::glue("WD{suffix}"), "Results", file_name) %>%
wd = glue::glue("WD{suffix}")) %>%
dplyr::mutate(file_contents = future_map(file_name, ~data.table::fread(file = .))) %>%
tidyr::unnest() %>%
purrr::set_names(nm = c("file_name", "wd", "season", "day", "pinkfoot", "pinkfoot_dist",
dplyr::select(-file_name) %>%
purrr::set_names(nm = c("wd", "season", "day", "pinkfoot", "pinkfoot_dist",
"barnacle", "barnacle_dist", "greylag", "greylag_dist",
"grain", "maize", "polyref", "param", "value")) -> all_res
......@@ -37,14 +38,16 @@ path(path_to_dirs, glue::glue("WD{suffix}"), "Results", grain_file_name) %>%
wd = glue::glue("WD{suffix}")) %>%
dplyr::mutate(file_contents = future_map(file_name, ~data.table::fread(file = .))) %>%
tidyr::unnest() %>%
purrr::set_names(nm = c("file_name", "wd", "season", "grain_dist", "param", "value")) -> all_grain
dplyr::select(-file_name) %>%
purrr::set_names(nm = c("wd", "season", "grain_dist", "param", "value")) -> all_grain
rotation_file_name <- "scenario-rotations.txt"
path(path_to_dirs, glue::glue("WD{suffix}"), rotation_file_name) %>%
tibble::tibble(file_name = .) %>%
dplyr::mutate(file_contents = future_map(file_name, ~data.table::fread(file = .))) %>%
tidyr::unnest() %>%
purrr::set_names(c("file_name", "wd", "rotation")) -> all_rotation
dplyr::select(-file_name) %>%
purrr::set_names(c("wd", "rotation")) -> all_rotation
numbers_file_name <- "scenario-goose-numbers.txt"
path(path_to_dirs, glue::glue("WD{suffix}"), "Results", numbers_file_name) %>%
......@@ -52,7 +55,8 @@ path(path_to_dirs, glue::glue("WD{suffix}"), "Results", numbers_file_name) %>%
wd = glue::glue("WD{suffix}")) %>%
dplyr::mutate(file_contents = future_map(file_name, ~data.table::fread(file = .))) %>%
tidyr::unnest() %>%
purrr::set_names(nm = c("file_name", "wd", "season", "day", "pf_families", "pf_non_breeders", "bn_families",
dplyr::select(-file_name) %>%
purrr::set_names(nm = c("wd", "season", "day", "pf_families", "pf_non_breeders", "bn_families",
"bn_non_breeders", "gl_families", "gl_non_breeders", "snow_depth",
"param", "value")) -> all_numbers
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment