Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logical comparison for row wise filtering when using dplyr not working #82

Open
henriquesposito opened this issue Mar 1, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@henriquesposito
Copy link
Collaborator

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")
@henriquesposito henriquesposito self-assigned this Mar 1, 2024
@henriquesposito henriquesposito added the bug Something isn't working label Mar 1, 2024
@henriquesposito henriquesposito mentioned this issue Mar 1, 2024
16 tasks
@henriquesposito
Copy link
Collaborator Author

henriquesposito commented Mar 1, 2024

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")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant