[英]What's the difference between dir/* , dir/**, dir/**/* , dir/**/*.* in globbing?
[英]Choose dir shiny
我有一个简单的闪亮应用程序,它可以在本地PC上运行,并且对我的Intranet用户可用。 我试图添加按钮以选择文件夹。
尝试:
UI
library(shiny)
shinyUI(fluidPage(
actionButton("goButton","Choose folder"),
textOutput("session"))
)
服务器
library(shiny)
shinyServer(function(input, output, session) {
observe({
if(input$goButton > 0){
output$session <- renderText(function(){
list.files(choose.dir())})
}
})
})
它可以在我的PC上正常运行,但是当有人在Intranet(其他PC)窗口中使用它来选择文件夹时,它将在我的PC上打开。
有没有办法在客户端PC上打开选择文件夹?
最好的选择是我可以找到它的库shinyFiles
(来自RU_SO的答案)
该软件包允许浏览服务器文件系统。
参见shinyFilesExample()
但对我来说,它的工作有点慢,我打算将简单的dunamic selectInput
与list.dirs(path = "some/path")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.