The correct answer is: All of the mentioned.
Slidify is a package that allows you to create interactive slideshows from R Markdown documents. It can be used to add quizzes, RCharts, and Shiny apps to your slideshows.
Quizzes can be added to slidify using the quiz()
function. This function takes a list of questions and answers as input and creates a quiz that can be answered by the user.
RCharts can be added to slidify using the rchart()
function. This function takes an R code object as input and creates a chart that can be displayed in the slideshow.
Shiny apps can be added to slidify using the shiny()
function. This function takes a Shiny app object as input and creates a link to the app that can be clicked on by the user.
Here is an example of how to add a quiz to a slidify slideshow:
“`r
library(slidify)
Create a list of questions and answers
questions <- list(
question = “What is the capital of France?”,
answer = “Paris”
)
Create a quiz
quiz <- quiz(questions)
Add the quiz to the slideshow
slideshow(quiz)
“`
Here is an example of how to add an RChart to a slidify slideshow:
“`r
library(slidify)
Create an R code object
code <- rnorm(100)
Create an RChart
chart <- rchart(code)
Add the chart to the slideshow
slideshow(chart)
“`
Here is an example of how to add a Shiny app to a slidify slideshow:
“`r
library(slidify)
Create a Shiny app
app <- shinyApp(
ui = fluidPage(
textOutput(“output”)
),
server = function(input, output) {
output$output <- renderText(paste(“Hello, world!”))
}
)
Add the Shiny app to the slideshow
slideshow(app)
“`