Skip to content

Commit

Permalink
data now read in via global.R
Browse files Browse the repository at this point in the history
  • Loading branch information
m-jahn committed Oct 25, 2019
1 parent 524c99b commit 049aa10
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 26 deletions.
Binary file removed data/2019_CRISPRi_library.Rdata
Binary file not shown.
Binary file added data/CRISPRi_library_2019.Rdata
Binary file not shown.
25 changes: 25 additions & 0 deletions global.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# LOADING LIBRARIES
# ***********************************************
library(shiny)
library(lattice)
library(latticeExtra)
library(tidyr)
library(dplyr)
library(shinyTree)
library(shinythemes)
library(dendextend)


# LOADING EXTERNAL FUNCTIONS AND DATA
# ***********************************************
for (Rfile in list.files("R", full.names = TRUE)) {
source(Rfile)
}

# list of data files
datalistfiles <- list.files("data", pattern = "\\.Rdata$", full.names = TRUE)
# load all of them
for (path in datalistfiles) load(path)
# clean names for selectInput
datalistfiles <- gsub("^data/|.Rdata$", "", datalistfiles)
6 changes: 3 additions & 3 deletions server.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ server <- function(input, output) {
data <- reactive({

# read user selected data set
load(input$UserDataChoice)
# coerce to base data.frame
data %>% ungroup %>% as.data.frame
get(input$UserDataChoice) %>%
# coerce to base data.frame
ungroup %>% as.data.frame
})

# GENERIC DATA FILTERING
Expand Down
24 changes: 1 addition & 23 deletions ui.R
Original file line number Diff line number Diff line change
@@ -1,26 +1,4 @@
#
# LOADING LIBRARIES
# ***********************************************
library(shiny)
library(lattice)
library(latticeExtra)
library(tidyr)
library(dplyr)
library(shinyTree)
library(shinythemes)
library(dendextend)


# LOADING EXTERNAL FUNCTIONS AND DATA
# ***********************************************
for (Rfile in list.files("R", full.names = TRUE)) {
source(Rfile)
}

# list of data files
datalistfiles <- list.files("data", pattern = "\\.Rdata$", full.names = TRUE)


#
# SHINY UI
# ***********************************************
# Define user interface for application
Expand Down

0 comments on commit 049aa10

Please sign in to comment.