小编qui*_*ion的帖子

便携式浏览器在部署R Shiny App时出现问题

我构建了一个复杂的Shiny接口,它从内部联网的ODBC表中提取,允许用户通过浏览器与数据交互.该公司在Windows 7 Enterprise上,IT仅支持IE 9.一些用户在他们的用户文件夹中安装了chrome,一些用firefox,一些使用IE 9.我按照R-Bloggers的教程(这里:http:// www. r-bloggers.com/deploying-desktop-apps-with-r/)它使用从PortableApps.com下载的便携式Chrome浏览器在我的机器上运行.大.不幸的是,界面还没有在安装了自己的本地Chrome浏览器的任何其他机器上启动.

在本教程之后,我使用以下vb脚本:

Rexe           = "R-Portable\App\R-Portable\bin\Rscript.exe"
Ropts          = "--no-save --no-environ --no-init-file --no-restore --no-Rconsole"
RScriptFile    = "runShinyApp.R"
Outfile        = "ShinyApp.log" 
strCommand     = Rexe & " " & Ropts & " " & RScriptFile & " 1> " & Outfile & " 2>&1"

intWindowStyle = 0     ' Hide the window and activate another window.'
bWaitOnReturn  = False ' continue running script after launching R   '

CreateObject("Wscript.Shell").Run strCommand, intWindowStyle, bWaitOnReturn
Run Code Online (Sandbox Code Playgroud)

此脚本在我的R文件中调用以下代码:

message('library paths:\n', paste('... ', .libPaths(), …
Run Code Online (Sandbox Code Playgroud)

windows portability google-chrome r shiny

8
推荐指数
1
解决办法
1780
查看次数

R Shiny DT :: renderDataTable卡在一个重叠的"Processing ..."横幅上

即使已经处理了数据表并且数据显示在横幅后面,我的DT数据表也有一个覆盖它的横幅,上面写着"正在处理...".横幅不会消失,它让我疯狂.

愚蠢的F%&*处理横幅

我的应用程序的某些用户想要使用已弃用的shiny :: renderDataTable()的列特定搜索功能,所以我在某些选项卡上运行了data ::frames的shiny :: renderDataTable(),而在其他选项卡上运行了DT :: renderDataTable()标签.

我正在使用R-Portable(Windows 7),因为应用程序需要部署到地板上的相关利益相关者...所以除非你使用R-Portable,否则我不相信你会完全重现环境我正在运行...但这看起来像是一个AJAX问题,所以也许有洞察力的人可以在没有"再现"错误的情况下给出答案.此外,这个Shiny App中至少有1500行代码,所以我正在尽我所能来解释这个问题,而不会留下太多的混乱.

在功能方面,我的应用程序中的一切都完美无瑕......我使用了以下所有软件包,包括shinyBS(bootstrap)和闪亮主题,将所有主要功能设置为global.R文件:

library(shiny)
library(shinyBS)
library(shinythemes)
library(RODBC)
library(ggplot2)
library(gridExtra)
library(Hmisc)
library(stringr)
library(data.table)
library(DT)
Run Code Online (Sandbox Code Playgroud)

我使用一个函数创建我的反应数据表对象,该函数使用RODBC从我们的SQL数据库调用...我有一个操作按钮,一个文本输入,而reactive()脚本调用函数AttrInfo()返回一个数据.帧.

TriInfo = reactive({
  input$UpdateTBAtt
  if(input$UpdateTBAtt == 0) return(NULL)
  isolate(withProgress(message = "Searching for Credit Attribute", 
                     value = 0, {
                       AttrInfo(input$TriAttr)
                     }))
})
Run Code Online (Sandbox Code Playgroud)

我的渲染数据表的代码遵循DT指南:

 output$TriLDD <- DT::renderDataTable({
   req(input$UpdateTBAtt)
   DT::datatable(TriInfo(),options = list(paging=FALSE,searching=FALSE))
 })
Run Code Online (Sandbox Code Playgroud)

我的ui.R文件调用此对象:

 shinyUI(fluidPage(
     list(tags$head(HTML('<link rel="icon", href="RosiePageICON.png", 
                  type="image/png" />'))),
     div(style="padding: 1px 0px; width: '100%'",
       titlePanel(title="", windowTitle="Rosetta")), 
     navbarPage(theme = shinytheme("spacelab"),title = div(img(src="ReadyRosie_Logo6.png"),""),
tabPanel("Tri-Bureau Attributes",
    sidebarLayout(
        sidebarPanel(width = 3,
            actionButton(inputId …
Run Code Online (Sandbox Code Playgroud)

r shiny dt

4
推荐指数
1
解决办法
1324
查看次数

标签 统计

r ×2

shiny ×2

dt ×1

google-chrome ×1

portability ×1

windows ×1