Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Shiny

You're reading from   Learning Shiny Make the most of R's dynamic capabilities and implement web applications with Shiny

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher
ISBN-13 9781785280900
Length 246 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Hernan Resnizky Hernan Resnizky
Author Profile Icon Hernan Resnizky
Hernan Resnizky
Hernan Resnizky Hernan Resnizky
Author Profile Icon Hernan Resnizky
Hernan Resnizky
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Introducing R, RStudio, and Shiny FREE CHAPTER 2. First Steps towards Programming in R 3. An Introduction to Data Processing in R 4. Shiny Structure – Reactivity Concepts 5. Shiny in Depth – A Deep Dive into Shiny's World 6. Using R's Visualization Alternatives in Shiny 7. Advanced Functions in Shiny 8. Shiny and HTML/JavaScript 9. Interactive Graphics in Shiny 10. Sharing Applications 11. From White Paper to a Full Application Index

The use of tags in UI.R


tags is an object of type list that is automatically generated inside Shiny applications, which enables the insertion of HTML tags within a user interface generated in UI.R. This basically contains a list of functions that will transform the string argument to the content of the tag used, for example, see the following:

tags$pre("Text inside a pre tag")

This generates the following tag:

<pre>Text inside a pre tag</pre>

Note

The complete list of tags can be found at http://shiny.rstudio.com/articles/tag-glossary.html.

Attributes can be passed to any of the functions in tags by passing them as arguments, for example:

tags$pre(align="right","Text inside a pre tag")

This will be turned into the following HTML:

<pre align="right">Text inside a pre tag</pre>

In the following UI.R code, the previous piece of code is included. This generates a pre-tag with the text before the number insertion widget:

library(shiny)

# Starting line
shinyUI(fluidPage(
  
  #...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image