简体   繁体   English

R 闪亮:通过另一台计算机运行代码时出错

[英]R shiny: errors when running the code via another computer

I have recently made a R shiny application.我最近做了一个 R 闪亮的应用程序。 Due to broken lap, I needed to run the code in another one but many problems of syntax appear and I don't know how to fix it.由于一圈坏掉,我需要在另一个中运行代码,但出现了许多语法问题,我不知道如何解决它。

Here is the beginning of my code:这是我的代码的开头:

ui <- navbarPage(title ="ESA Data Explorer", theme = shinytheme("united"),
             #### About us Shiny menu #####
             navbarMenu("About us",
                        tabPanel("The lab",
                                 h3(strong("Who are we?")),
                                 h4("We are a multidisciplinary research group of the Université Libre de Bruxelles,
                        which includes biologists, microbiologists,
                           ecological modelers and bioengineers. Our activities focus on the study
                           and modeling of the structure and functioning of aquatic systems 
                           (rivers, lakes, estuaries and coastal waters) and their response to natural
                           and anthropogenic changes. Our methodology involves and combines field observations,
                           process level studies under field and laboratory-controlled conditions and ecological
                           and biogeochemical modeling."),
                                 h3(strong("Our main research domains are:")),
                                 h4("- Coastal eutrophication"),
                                 h4("- Marine biogeochemical cycles and climatic gases"),
                                 h4("- Bacterial ecology of surface waters"),
                                 h4("- Microbiological quality of aquatic
                        ecosystems"),
                                 h4("- Microbiological aspect of drinking water production and distribution"),
                                 h5("More informations about the lab available",
                                    a("here", href = "http://esa.ulb.ac.be/")),
                                 br(),
                                 br(),
                                 br(),
                                 br(),
                                 br(),
                                 br()



                        )))

The error that i receive is :我收到的错误是:

Error : unexpected symbol in: " br() ui"错误:意外符号:“br() ui”

When I delete this part to run the next one of the ui function, I get the same message but in a different manner.当我删除这部分以运行下一个 ui 函数时,我收到相同的消息,但方式不同。 It is always referred as unexpected symbol in a part of my text while everything looks correct.它总是在我的文本的一部分中被称为意外符号,而一切看起来都是正确的。 About the server function, everything is working perfectly.关于服务器功能,一切正常。 It seems like R can't read correctly this code, maybe due to different encoding, or because R is in a different version, I really don't know.似乎 R 无法正确读取此代码,可能是由于编码不同,或者因为 R 的版本不同,我真的不知道。 Could you please help me to fix this problem?你能帮我解决这个问题吗?

Thanks.谢谢。

You might have the two packages that have你可能有两个包

br()

as an option on the new laptop.作为新笔记本电脑的一个选项。 (use ?br to see if that is the case) (使用 ?br 看看是否是这种情况)

Try to specify which one you are calling via.尝试指定您通过哪个呼叫。

shiny::br()

or或者

htmltools::br()

For your code your would need-对于您的代码,您需要-

...
shiny::br(),
shiny::br(),
shiny::br()
...(for example)

This usually helps happens to me when I forget to specifity select in dplyr.当我忘记在 dplyr 中指定选择时,这通常对我有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 R 代码在一台计算机上运行良好,但在另一台计算机上运行良好(通过 RScript.exe 中的任务计划程序) - R code runs well on one computer but not on another (via Task Scheduler in RScript.exe) 使用 Shiny R 运行 css 时出错 - Got an error when running css with Shiny R R在运行复杂代码时不使用我计算机的GPU - R does not engage my computer's GPU when running complex code 为什么这个 dplyr() 分组代码在基础 R 中有效,但在 Shiny 中运行时无效? - Why does this dplyr() grouping code work in base R but not when running in Shiny? 在Shiny中运行R代码时utf8towcs中的无效输入错误 - Invalid input error in utf8towcs when running R code in shiny 通过R建立到另一台计算机的SSH隧道以访问postgreSQL表 - Make an SSH tunnel to another computer via R to access postgreSQL table 通过shell vs.rstudio调用时脚本未运行,会生成r错误,在gui中运行时不会出现 - script not running when called via shell vs. rstudio, generates r errors that I don't get when running in gui 仅在服务器上运行闪亮的应用程序时出错-调试 - Errors only when running shiny application on server - debug 列出从另一个 Shiny 运行本地应用程序(及其端口) R session - List running local Shiny apps (and their port) from another R session 在 R 中运行 Caret 包时出错 - Errors when running Caret package in R
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM