[英]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.