
Learning Shiny
By :

Shiny is a package created by RStudio, which enables to easily interface R with a web browser. As stated in its official documentation, Shiny is a web application framework for R that makes it incredibly easy to build interactive web applications with R.
One of its main advantages is that there is no need to combine R code with HTML/JavaScript code as the framework already contains prebuilt features that cover the most commonly used functionalities in a web interactive application. There is a wide range of software that has web application functionalities, especially oriented to interactive data visualization. What are the advantages of using R/Shiny then, you ask? They are as follows:
As with any other package available in the CRAN repositories, the easiest way to install Shiny is by executing install.packages("shiny")
.
The following output should appear on the console:
Due to R's extensibility, many of its packages use elements (mostly functions) from other packages. For this reason, these packages are loaded or installed when the package that is dependent on them is loaded or installed. This is called dependency. Shiny (on its 0.10.2.1 version) depends on Rcpp
, httpuv
, mime
, htmltools
, and R6
.
An R session is started only with the minimal packages loaded. So if functions from other packages are used, they need to be loaded before using them. The corresponding command for this is as follows:
library(shiny)
When installing a package, the package name must be quoted but when loading the package, it must be unquoted.
Change the font size
Change margin width
Change background colour