2016-11-10 47 views
0

我想通过Windows中的批处理文件运行闪亮的仪表板。这里是我的run.r文件看起来像错误:shinyjs:解析提供的JavaScript代码时出错

require(shiny) 
require(shinyjs) 
folder_address = 'E://Dash' 
runApp(folder_address, launch.browser=TRUE) 

这里是我的batch file看起来像

"C:\Program Files\R\R-3.3.1\bin\R.exe" -e "shiny::runApp('E:/Dash', launch.browser=TRUE)" 

但是,每当我运行该批处理文件,它会打开浏览器并引发此错误

ERROR: shinyjs: Error parsing the JavaScript code provided. 

回答

0

要在Windows中从批处理文件运行位于E:\Dash中的闪亮应用:

  1. 你可以运行在读该函数库文件夹:

    .libPaths() 
    "C:/Users/me/Documents/R/R-3.3.1/library" 
    
  2. 你run.R应该是:

    require(shiny) 
    folder_address = 'E:/Dash' 
    runApp(folder_address, launch.browser=TRUE) 
    
  3. 你RUN.BAT应该是:

    "C:\Program Files\R\R-3.3.1\bin\Rscript.exe" E:/Dash/run.R R_LIBS="C:/Users/me/Documents/R/R-3.3.1/library" 
    
+0

不明白路径'R_LIBS' – Neil