即使包括renderTrelliscope函数,似乎在闪亮的情况下也无法使用网格镜。你们中的任何人都可以帮助我确认这一点吗?
尽管这些链接似乎有帮助: https://www.rdocumentation.org/packages/trelliscopejs/versions/0.1.18/topics/Trelliscope-shiny
有问题但无法帮助我 https://github.com/hafen/trelliscopejs/issues/37
library(shiny)
install.packages("gapminder")
library(gapminder)
devtools::install_github("hafen/trelliscopejs")
library(trelliscopejs)
ui <- fluidPage(
# App title ----
titlePanel("Hello trelliscope in Shiny!"),
# Sidebar layout with input and output definitions ----
fluidPage(
# Main panel for displaying outputs ----
mainPanel(
# Output: Histogram ----
trelliscopeOutput("plot", width = "100%", height = "400px")
)
)
)
server <- function(input, output) {
output$plot <- renderTrelliscope(
qplot(year, lifeExp, data = gapminder) +
xlim(1948, 2011) + ylim(10, 95) + theme_bw() +
facet_trelliscope(~ country + continent,
nrow = 2, ncol = 7, width = 300, as_plotly = TRUE)
)
}
shinyApp(ui, server)
我们如何在光泽内渲染facet_trelliscope?