From 90e4597006e7b44f7df1abbd51736336889046ba Mon Sep 17 00:00:00 2001 From: lilyclements Date: Wed, 7 Feb 2024 16:06:00 +0000 Subject: [PATCH] select only variables we want --- R/map_data.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/map_data.R b/R/map_data.R index bcd3926..657a992 100644 --- a/R/map_data.R +++ b/R/map_data.R @@ -36,6 +36,7 @@ map_data <- function(data, values, node_values) { tidyr::pivot_longer(cols = c({{ values }}, {{ node_values }}), names_to = "group", values_to = "id") %>% + dplyr::select(c(id, group)) %>% dplyr::arrange(group) %>% dplyr::distinct() %>% dplyr::mutate(id_index = row_number() - 1)