Book Image

Learning Shiny

By : Hernan Resnizky
Book Image

Learning Shiny

By: Hernan Resnizky

Overview of this book

Table of Contents (19 chapters)
Learning Shiny
Credits
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Introducing R, RStudio, and Shiny
Index

UI.R


This section will cover the different parts of the interface with its corresponding functions. In short, we will look at the following:

  • Structure, which will be divided into the following:

    • Pages

    • Layouts

    • Panels

    • Rows

    • Columns

  • Inputs, which will be divided into the following:

    • Free inputs

    • Lists

    • Dates

    • Files

    • Buttons

The structure

Shiny provides some templates for web applications. They are general structures to organize the different elements within the interface, such as the position of the inputs, the position of the outputs, and so on.

Many of the elements related to structure are divided into fluid and fixed. The main difference is that fluid containers adjust the width of their elements to the browser's width while fixed is used with a user specified width.

Generally, elements in Shiny order themselves row-wise inside a structure, that is, one below the other. For example, the structure1(elementA,elementB) pseudocode will display elementB below elementA inside structure1. Although not recommended at...