【发布时间】:2016-02-26 16:37:48
【问题描述】:
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 个文件,然后合并它们。之后不显示它们,我需要下载合并的文件。
我编写了上面的代码,但打开了一个对话框,询问我在哪里保存,但文件没有保存。我的下载处理程序有问题吗?
ui.R
downloadButton('downloadData','Download')
这是我在 ui.R 文件的主面板中的内容
【问题讨论】: