- Web Application Development with R Using Shiny(Third Edition)
- Chris Beeley Shitalkumar R. Sukhdeve
- 180字
- 2021-07-16 17:52:11
The program structure
Since the first edition of this book, a significant change has taken place with regards to how Shiny applications are structured. A new feature has been added, giving us the ability to place them all within one code file. This is most useful when building small demonstrations or examples for other users, who can just paste the whole code file into the console and have the application run automatically. In order to make use of this functionality, just combine the code from server.R and ui.R, as shown in the following example:
library(shiny) server <- function(input, output) { #contents of server.R file } ui <- fluidPage( # or other layout function # contents of ui.R file ) shinyApp(ui = ui, server = server)
This is useful neither for large applications, nor for the purposes of explaining the functions of particular parts of code within this book, so we shall ignore it from now on. Just be aware that it's possible; you may well come across it on forums, and you may wish to contribute some small examples yourself.
- 物聯(lián)網(wǎng)智慧安監(jiān)技術(shù)
- Hands-On Industrial Internet of Things
- JBoss EAP6 High Availability
- 互聯(lián)網(wǎng)基礎(chǔ)資源技術(shù)與應(yīng)用發(fā)展態(tài)勢(2021—2023)
- Go Web Scraping Quick Start Guide
- 互聯(lián)網(wǎng)安全的40個智慧洞見:2015年中國互聯(lián)網(wǎng)安全大會文集
- React:Cross-Platform Application Development with React Native
- 中小型局域網(wǎng)組建、管理與維護實戰(zhàn)
- 面向5G-Advanced的關(guān)鍵技術(shù)
- 網(wǎng)絡(luò)綜合布線(第2版)
- 一本書讀懂TCP/IP
- 想象的互動:網(wǎng)絡(luò)人際傳播中的印象形成
- OSPF協(xié)議原理與功能拓展
- Migrating to Drupal7
- 互聯(lián)網(wǎng)心理學(xué):新心理與行為研究的興起