0
library(shiny)
library(plyr)
shinyServer(function(input, output){
myfile<-reactive({
#reading 3 csv files and merging them into a dataframe
})
output$downloadData<-downloadHandler(
filename = function(){
paste("mergedfile","csv",sep='.')
},
content= function(file){
write.csv(myfile(),file,sep=",")
}
)
})
我正在反應讀取3-4個文件,然後合併它們。之後,沒有顯示他們,我需要下載合併的文件。下載處理程序不保存文件閃亮R
我寫了上面的代碼,但打開一個對話框,詢問我在哪裏保存,但文件沒有保存。我在做下載處理程序的問題嗎?
ui.R
downloadButton('downloadData','Download')
這是我在我的ui.R主面板文件
奧斯卡,這工作像在瀏覽器中的魅力。我從來沒有猜到過。你的鏈接也有幫助。謝謝! – codemob
很高興能幫到你! –