messydates
messydates copied to clipboard
Logical comparison for row wise filtering when using `dplyr` not working
manyhealth::memberships$HUGGO_MEM %>%
dplyr::filter(messydates::year(Begin) > "1999" & messydates::year(Begin) < "2010") %>%
dplyr::filter(stateID == "USA" | stateID == "CHN") %>%
as_tidygraph() %>%
mutate_ties(color = ifelse(to == 47, "China", "USA")) %>%
autographr(edge_color = "color")
This issues was related to comparing 'mdate' objects and character objects (e.g.as_messydate("2010-09-10") > "2009"). This feature has been added now. The following should work @jaeltan . Thank you.
manyhealth::memberships$HUGGO_MEM %>% dplyr::filter(Begin > "1999" & Begin < "2010", stateID == "USA" | stateID == "CHN") %>% as_tidygraph() %>% mutate_ties(color = ifelse(to == 47, "China", "USA")) %>% autographr(edge_color = "color")