程序问答   发布时间:2022-06-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了书签在模块中的shinyFiles 中的shinyDirChoose 出错大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

如何解决书签在模块中的shinyFiles 中的shinyDirChoose 出错?

开发过程中遇到书签在模块中的shinyFiles 中的shinyDirChoose 出错的问题如何解决?下面主要结合日常开发的经验,给出你关于书签在模块中的shinyFiles 中的shinyDirChoose 出错的解决方法建议,希望对你解决书签在模块中的shinyFiles 中的shinyDirChoose 出错有所启发或帮助;

我尝试将书签与 shinyDirbutton() 中的 shinyfiles 一起使用,应用程序正在运行,但书签状态不起作用,我不断收到错误

你知道如何解决这个问题吗?

Warning in if (!is.na(attribvalue)) { :
  the condition has length > 1 and only the first element will be used
Warning in charToRaw(enc2utf8(text)) :
  argument should be a character vector of length 1
all but the first element will be ignored
library(shiny)
library(shinyfiles)

path_ui <- function(ID){
    ns <- NS(ID)
    tagList(
      shinyDirbutton(ns("file"),"Upload",falSE),verbatimtextoutput(ns("test"))
    )
}

  
path_server <- function(input,output,session) {
  ns <- session$ns
  vol <- getVolumes()()
  
  shinyDirChoose(input,"file",session = session,root = vol)
  
  userfile <- reactive({
    valIDate(need(input$file,message = falSE))
    input$file
  })
  
  path_upload <- reactive({
    req(is.List(input$filE)) # fix the problem
    path <- parseDirPath(vol,userfile())
    return(path)
  })
  
  output$test <- renderPrint({
    req(length(path_upload())>= 1)
    path_upload()
  })
}

  
ui <- function(request){
  fluIDPage(
  h4("This is test"),path_ui("path_test"),bookmarkbutton()
  )
}

server <- function(input,session) {
  callModule(path_server,"path_test")
}

shinyApp(ui,server,enableBookmarking = "server")

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

大佬总结

以上是大佬教程为你收集整理的书签在模块中的shinyFiles 中的shinyDirChoose 出错全部内容,希望文章能够帮你解决书签在模块中的shinyFiles 中的shinyDirChoose 出错所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。