我想使用.sas7bdat
将数据帧导出为haven
,但是我在repex中收到错误Writing failure: A provided name contains an illegal character
:
library(shiny)
library(haven)
ui <- fluidPage(
downloadButton("downloadSAS", "SAS")
)
# Define server logic required to draw a histogram
server <- function(input, output) {
output$downloadSAS <- downloadHandler(
filename = function() {
paste("test.sas7bdat")
},
content = function(file) {
write_sas(iris, file)
}
)
}
# Run the application
shinyApp(ui = ui, server = server)
我希望我缺少一个简单的解决方法?请指教!