I wonder if it is possible to create a link to other part of Shiny app. I mean, I have one page report with Itroductiion
,Plot 1
and Plot 2
panel.Within Introduction
Panel I would like to add a referent to Plot 1
and Plot 2
Panel in order to see this plot immadiately, after click the link. It is possible?
ui.R
library(shiny)
shinyUI(
fluidPage(
fluidPage(
titlePanel("Introduction"),
column(12,
p("Lorem ipsum dolor sit amet, consectetur adipisicing elit. Proin
nibh augue, suscipit a, scelerisque sed, lacinia in, mi. Cras vel
lorem. Etiam pellentesque aliquet tellus. Phasellus pharetra nulla
ac diam. Quisque semper justo at risus. Donec venenatis, turpis vel
hendrerit interdum, dui ligula ultricies purus, sed posuere libero
dui id orci. Nam congue, pede vitae dapibus aliquet, elit magna
vulputate arcu, vel tempus metus leo non est. Etiam sit amet lectus
quis est congue mollis. Phasellus congue lacus eget neque. Phasellus
ornare, ante vitae consectetuer consequat, purus sapien ultricies
dolor, et mollis pede metus eget nisi. Praesent sodales velit quis
augue. Cras suscipit, urna at aliquam rhoncus, urna quam viverra nisi,
in interdum massa nibh nec erat."))
),
fluidPage(
titlePanel("Hello Shiny!"),
sidebarLayout(
sidebarPanel(
sliderInput("bins",
"Number of bins:",
min = 1,
max = 50,
value = 30)
),
mainPanel(
plotOutput("distPlot")
)
)
),
fluidPage(
titlePanel("Hello Shiny!"),
sidebarLayout(
sidebarPanel(
sliderInput("bins",
"Number of bins:",
min = 1,
max = 50,
value = 30)
),
mainPanel(
plotOutput("distPlot2")
)
)
))
)
server.R
library(shiny)
shinyServer(function(input, output) {
output$distPlot <- renderPlot({
x <- faithful[, 2] # Old Faithful Geyser data
bins <- seq(min(x), max(x), length.out = input$bins + 1)
hist(x, breaks = bins, col = 'darkgray', border = 'white')
})
output$distPlot2 <- renderPlot({
x <- faithful[, 2] # Old Faithful Geyser data
bins <- seq(min(x), max(x), length.out = input$bins + 1)
hist(x, breaks = bins, col = 'darkgray', border = 'white')
})
})
See Question&Answers more detail:
os