Skip to content

Commit

Permalink
Fixed popgen excel download
Browse files Browse the repository at this point in the history
  • Loading branch information
agouy committed Nov 29, 2024
1 parent 6de09b5 commit 5157f45
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions R/module_for_popgen.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ popgen_UI <- function(id) {
ns = ns,
div(tableOutput(ns('diversity')) %>% shinycssloaders::withSpinner(color="#dd4814"), style = "font-size:75%"),
downloadButton(ns('dlPopgen'), 'Download as text (.txt)'),
downloadButton(ns('dlPopgenCL'), 'Download as Excel (.xlsx)'),
downloadButton(ns('dlPopgenXL'), 'Download as Excel (.xlsx)'),
tags$hr(),
uiOutput(ns("uiPG")),
uiOutput(ns("plotPG"))
Expand Down Expand Up @@ -199,7 +199,11 @@ for_popgen_Server <- function(id, input_file, getgenind, popnames, ploidy, hw_pe
req(reacIndices_pop_for())
taB <- reacIndices_pop_for()
out <- taB[, ! colnames(taB) %in% c("Ht", "Fis", "Fst")]
openxlsx::write.xlsx(list(forensics_parameters = out), file, row.names = FALSE)
openxlsx::write.xlsx(
list(forensics_parameters = out),
file,
row.names = FALSE
)
}
)

Expand Down

0 comments on commit 5157f45

Please sign in to comment.