save location does not pops up; directly launches the file

shiny

#1
output$saveMetaData <- downloadHandler(
    filename = function(){
      paste("meta",".txt")
    },
    content = function(file2){
      write.table(v$scData@meta.data, file2, quote = F, row.names = T, col.names = T, sep = "\t")
    }
  )

#2

Hi @shantanubafna, please try to include more information next time

I believe you're referring to the fact that if you click on a download button, the file gets downloaded without prompting you for a location to save. If you want to decide where to save it, try right clicking on the button and choosing "Save link as..." (or the equivalent in your browser).


#3

Sorry. I'll keep that in mind. Thanks! that works


#4

If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:


#5

SOLUTION

Data <- downloadHandler(
    filename = function(){
      paste("normalized",".txt")
    },
    content = function(file1){
      #reading it as matrix as normalized data is sparse matrix
      write.table(data.frame(**as.matrix(v$scData@data)**), file1, quote = F, row.names = T, col.names = T, sep = "\t")
    }
  )

#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.