我正在尝试使用shineFiles创建一个简单的闪亮应用程序,允许用户从Web上的目录中选择要下载的文件。
library(shiny)
library(shinyFiles)
ui <- fluidPage(
shinyFilesButton('files', label='File select', title='Please select a file', multiple=FALSE)
)
server <- function(input, output) {
shinyFileChoose(input, 'files',
roots = (root = c('http://mirrors.vbi.vt.edu/mirrors/ftp.ncbi.nih.gov/blast/db/')),
filetypes=c('', 'txt' , '.gz' , '.md5'))
}
shinyApp(ui = ui , server = server)
但是,我收到以下错误:
Listening on http://127.0.0.1:6772
Warning: Error in fileGet: Roots must be a named vector or a function returning one
Stack trace (innermost first):
60: fileGet
59: do.call
58: observerFunc
1: runApp
ERROR: [on_request_read] connection reset by peer
我需要帮助将目录定义为:http://mirrors.vbi.vt.edu/mirrors/ftp.ncbi.nih.gov/blast/db/