The goal of {spoiler}
is to blur any HTML elements
(text, plots, etc.) in R Shiny apps, so that spoilers are avoided.
You can install the GitHub version of {spoiler}
with:
# install.packages("devtools")
::install_github("etiennebacher/spoiler") devtools
library(shiny)
library(spoiler)
# works better in browser
<- fluidPage(
ui use_spoiler(),
column(
4,
spoiler(plotOutput("test"))
),hide_spoilers(max = 10, partial = 4)
)
<- function(input, output, session) {
server
$test <- renderPlot(plot(mtcars$mpg))
output
}
shinyApp(ui, server)