Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用library(writexl)pakcage以自定义名称保存多个数据帧_R_Shinyapps - Fatal编程技术网

如何使用library(writexl)pakcage以自定义名称保存多个数据帧

如何使用library(writexl)pakcage以自定义名称保存多个数据帧,r,shinyapps,R,Shinyapps,我使用writexl包将两个数据帧保存到一个csv文件中 这是我代码的一部分: library(writexl) server <- function(input,output){ filename = function(){ paste('data.csv') }, content = function(file){ df1 <- ... df2 <- ... write_xlsx(

我使用writexl包将两个数据帧保存到一个csv文件中

这是我代码的一部分:

library(writexl)
server <- function(input,output){
    filename = function(){
              paste('data.csv')
            },
    content = function(file){
    df1  <- ...
    df2 <- ...
    write_xlsx(list(df1,df2), file) 
        }
      )
库(writexl)

服务器只需命名列表中的数据帧,它就可以工作了

write_xlsx(list(df1 = df1, df2 = df2), file)


只需在列表中命名数据帧,它就会工作

write_xlsx(list(df1 = df1, df2 = df2), file)


嗨,我刚算出来:

write_xlsx(list("sheet name1" = df1, "sheet name2" = df2), file)

嗨,我刚算出来:

write_xlsx(list("sheet name1" = df1, "sheet name2" = df2), file)