Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • a78cb8f
  • /
  • module
  • /
  • Savemoduletable.R
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge
swh:1:cnt:351e50a89cdd078a18328d9a85a9b3d2dce4e127
directory badge
swh:1:dir:c2fbeb3a282ae4e712de69c4c8697d75059f7bda

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Savemoduletable.R
#' downloadFilestab is a shiny widget which aims is to download a reactive plot
#'
#' @param id Shiny id
#' @param label Shiny label
#'
#' @return Widget in the gui
#'
#' @export
#'

downloadFilestab <- function(id, label = "Save your Scree plot") {
  ns <- NS(id)
  downloadButton(ns("downloadtable"), label ,   style ="color: #fff; background-color: #337ab7; border-color: #2e6da4")
}



#' downoutputables is a shiny module which aims is to export reactive table
#'
#' @param input Internal
#' @param output Internal
#' @param session Internal
#' @param projectname A reactive character (MA project or session data)
#' @param suffix A character
#' @param data A reactive expression to be plot
#' @param cont A reactive character vector of the selected comparison(s)
#' @param case A numeric value
#' @param xlsx A boolean value
#'
#' @export
#'

downoutputables <- function(input, output, session , projectname, suffix = "plot.csv",  data = NULL , cont = NULL,  xlsx = F , case ) {
  

  
  output$downloadtable  <- downloadHandler(
    
    filename <- function() {
      
      paste0(basename(file_path_sans_ext(projectname())), suffix  , sep ='')},
    

    content <- function(file) {
      
    if(!xlsx)  
      write.table(try(switch(case, 
                   myventocsv(data()  ,cont()), 
                   mysetventocsv(setvglobalvenn(data(), cont(), dll =T )),
                   data())),
        file,
        na = "",
        row.names = F,
        col.names = T,
        append = TRUE,
        sep = ";"
      )
    else
      withProgress(message = 'Creation of the xlsx table:',
                   value = 0, {
                     n <- NROW(50)
                     for (i in 1:n) {
                       incProgress(1 / n, detail = "Please wait...")
                     }
                     
                     
                     library(xlsx)
                     
                     for (i in 1:length(data())) {
                       if (i == 1)
                         write.xlsx(file = file,data()[[i]],
                                    sheetName = paste("Cluster", i))
                       else
                         write.xlsx(
                           file = file,
                           data()[[i]],
                           sheetName = paste("Cluster", i),
                           append = TRUE
                         )
                     }
                   })
      
    })
  
}

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API