Last active
May 13, 2019 18:35
-
-
Save zackbatist/c9ec13e00438afd6610b7244f69a0f8c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#QueryInputs is a list or dataframe containing selectInput values | |
#We would just have to update the QueryInputs object and then re-run QueryResults to refresh the output and regenerate the table (I hope) | |
QueryResults <- function(QueryInputs) { | |
Level2 <- dbReadTable(pool, 'level2') | |
filtered <- Level2 | |
if (!is.null(QueryInputs$Locus)) { | |
filtered <- filtered %>% filter(Locus %in% QueryInputs$Locus) | |
} | |
if (!is.null(QueryInputs$Blank)) { | |
filtered <- filtered %>% filter(Blank %in% QueryInputs$Blank) | |
} | |
if (!is.null(QueryInputs$Modification)) { | |
filtered <- filtered %>% filter(Modification %in% QueryInputs$Modification) | |
} | |
if (!is.null(QueryInputs$Period)) { | |
filtered <- filtered %>% filter(Period %in% QueryInputs$Period) | |
} | |
filtered | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment