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

Styling


Once we have a complete working application, it is time for some styling with CSS. In the following example, just some fonts are changed. It is always good, when possible, to control the styles with CSS. There are some widgets, such as plot outputs that are not so easy to handle as the tags assignment is restricted.

In the following CSS, saved as style.css, some of the texts are styled as follows:

.title {
  font-size: 18px;
  font-weight: bold;
}
h1 {
  font-style: italic;
  font-family: impact;
}

As it was explained in Chapter 8, Shiny and HTML/JavaScript, CSS stylesheets can be included with an includeCSS() statement inside UI.R:

# Starting line
shinyUI(fluidPage(
 
 #CSS styling
 includeCSS("PATH_to_CSS_file/style.css"),
 # Application title
 titlePanel("Adult Dataset"),

Discovering insights in the application

With an application ready to use, it is always rewarding to find out that it fulfills its purpose. In this case, it would be to discover insights visually from the data.

The following...

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