Formatted text
Shiny has many functions that can transform plain text into formatted text. Simply place text inside the h1()
function to create a primary header (e.g. a title), h2()
for a secondary header, strong()
to make text bold, em()
to make text italicized, or any of the other formatting functions.
You can also intermingle plain text and formatted text as much as you'd like—just remember to separate all the elements with commas!
Este ejercicio forma parte del curso
Case Studies: Building Web Applications with Shiny in R
Instrucciones del ejercicio
Place the following text inside the Shiny app:
- The word "DataCamp" as a primary header.
- The words "Shiny use cases course" as a secondary header.
- The word "Shiny" in italics.
- The words "is fun" as bold text.
After completing the instructions, your Shiny app should render the following text:
DataCamp
Shiny use cases course
Shiny is fun
Ejercicio interactivo práctico
Prueba este ejercicio completando el código de muestra.
# Load the shiny package
library(shiny)
# Define UI for the application
ui <- fluidPage(
# "DataCamp" as a primary header
___,
# "Shiny use cases course" as a secondary header
___,
# "Shiny" in italics
___,
# "is fun" as bold text
___
)
# Define the server logic
server <- function(input, output) {}
# Run the application
shinyApp(ui = ui, server = server)