Skip to content

Instantly share code, notes, and snippets.

@ATpoint
Created July 25, 2023 09:30
Show Gist options
  • Save ATpoint/557a3b052c5ef48297af859a5c2a787a to your computer and use it in GitHub Desktop.
Save ATpoint/557a3b052c5ef48297af859a5c2a787a to your computer and use it in GitHub Desktop.
reprex::reprex({
d <- data.frame(a=1)
# Works
suppressMessages({library(AnnotationDbi); library(dplyr)})
d %>% select(a)
detach("package:AnnotationDbi", unload=TRUE)
detach("package:dplyr", unload=TRUE)
# Does not work due to namespace conflict
suppressMessages({library(dplyr); library(AnnotationDbi)})
d %>% select(a)
# Always works
d %>% dplyr::select(a)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment