From 10b84d4b3b43f91ff45d616b865b6108ec46d3d1 Mon Sep 17 00:00:00 2001 From: CJ Yetman Date: Sat, 9 Sep 2023 18:09:47 +0200 Subject: [PATCH] Update get_gw.R --- dictionary/get_gw.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dictionary/get_gw.R b/dictionary/get_gw.R index e9e8b72..eca69f5 100644 --- a/dictionary/get_gw.R +++ b/dictionary/get_gw.R @@ -21,12 +21,12 @@ gw <- gw %>% country = gsub(" \\(Annam.*", "", country) ) %>% # ambiguous or not covered - filter(!gwc %in% c("TBT", "DRV", "HSD", "HSE", "WRT", "UPC", "TRA")) %>% + filter(!gwc %in% c("TBT", "DRV", "HSD", "HSE", "WRT", "UPC", "TRA")) %>% mutate(idx = 1:n()) |> group_by(idx) |> mutate(panel = list(year(birth):year(death))) %>% ungroup() |> - unnest(panel) |> + unnest(panel) |> select(-idx, -birth, -death) |> rename(year = panel) |> # arbitrary