[英]Choose dir shiny
I have simple shiny app which run on my local PC and avaliable for users in my intranet. 我有一个简单的闪亮应用程序,它可以在本地PC上运行,并且对我的Intranet用户可用。 I tried to add button to choose folder. 我试图添加按钮以选择文件夹。
Tried: 尝试:
UI UI
library(shiny)
shinyUI(fluidPage(
actionButton("goButton","Choose folder"),
textOutput("session"))
)
Server 服务器
library(shiny)
shinyServer(function(input, output, session) {
observe({
if(input$goButton > 0){
output$session <- renderText(function(){
list.files(choose.dir())})
}
})
})
It works ok on my PC, but when someone use it in intranet(other PC) window to choose folder opens in my PC. 它可以在我的PC上正常运行,但是当有人在Intranet(其他PC)窗口中使用它来选择文件夹时,它将在我的PC上打开。
is there way to open choose folder on client PC? 有没有办法在客户端PC上打开选择文件夹?
Best option what i can find its library shinyFiles
( answer from RU_SO ) 最好的选择是我可以找到它的库shinyFiles
(来自RU_SO的答案)
This package allow navigate throught server file system. 该软件包允许浏览服务器文件系统。
see shinyFilesExample()
参见shinyFilesExample()
But for me its work a bit slow and i plan to use simple dunamic selectInput
with list.dirs(path = "some/path")
但对我来说,它的工作有点慢,我打算将简单的dunamic selectInput
与list.dirs(path = "some/path")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.