Commit ee0ca3a6 authored by Kunst, Jonathan's avatar Kunst, Jonathan
Browse files

both rds and csvs can now be used with proper datatableoutput. lists become...

both rds and csvs can now be used with proper datatableoutput. lists become uneven with mapply used so a switch is needed
parent 2df2f846
......@@ -132,10 +132,17 @@ server <- function(input, output, session) {
# Phased Linkage maps
link_map <- reactive({
req(input$i_link_map)
mapply(load_file,
name = input$i_link_map$name,
path = input$i_link_map$datapath,
SIMPLIFY = FALSE)
name <- input$i_link_map$name[1] # if multiple csv length too long
extension <- tools::file_ext(name)
# typical .rds file is already a list and nesting from mapply makes uneven
switch(extension,
csv = mapply(load_file,
name = input$i_link_map$name,
path = input$i_link_map$datapath,
SIMPLIFY = FALSE),
rds = load_file(name = name, path = input$i_link_map$datapath)
)
})
# update maplist selection
......@@ -158,11 +165,13 @@ server <- function(input, output, session) {
output$table_phenotype <- DT::renderDataTable(phenotype())
# table for linkage map file(s)
output$table_link_map <- DT::renderDataTable(link_map()[rv$linkage_select()][[1]])
output$table_link_map <- DT::renderDataTable(link_map()[[rv$linkage_select()]])
# test text
output$text_link_map <- eventReactive(input$map_choice,
{print(names(link_map()[rv$linkage_select()][[1]]))
{rvname <- rv$linkage_select()
print(rvname)
print(link_map()[[rvname]])
})
# table for SNP dosage
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment