https://github.com/fsiola/modularShinyDashboard
A modular shinydashboard based mostly on naming conventions
https://github.com/fsiola/modularShinyDashboard
Last synced: 4 months ago
JSON representation
A modular shinydashboard based mostly on naming conventions
- Host: GitHub
- URL: https://github.com/fsiola/modularShinyDashboard
- Owner: fsiola
- Created: 2016-02-11T19:20:18.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-25T17:41:38.000Z (about 9 years ago)
- Last Synced: 2024-08-13T07:15:32.680Z (8 months ago)
- Language: R
- Homepage:
- Size: 4.88 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - fsiola/modularShinyDashboard - A modular shinydashboard based mostly on naming conventions (R)
README
# modularShinyDashboard
A modular shinyDashboard based mostly on naming conventions# Usage
Create a folder inside "modules" folder containg the following files:
- ui.R: this file holds the UI structure of your module and the link to be added to the sidebar.
- server.R: this file holds the server strcuture of your module.
- OnLoad.R: this file holds all run-once code of your module.For reference, please check the HelloWorld module.
It is a good practice to name all variables inside a module with the same prefix to avoid naming problems between modules.
## ui.R
You should create your UI just like any other Shiny page. There are two things you should do here:
- The UI must be assigned to a tabItem variable with naming matching the "\*TabPage\*" pattern.
- You must provide a menuItem variable with naming matching the "\*LinkPage\*" pattern.
## server.R
Place here all your server functions that uses the $output Shiny variable.## OnLoad.R
Place here all functions from your module that should run only once the Shiny application is loaded.