| langevitour-shiny | R Documentation | 
Output and render functions for using langevitour within Shiny applications and interactive Rmd documents.
langevitourOutput(outputId, width = "100%", height = "600px")
renderLangevitour(expr, env = parent.frame(), quoted = FALSE)
outputId | 
 output variable to read from  | 
width, height | 
 Must be a valid CSS unit (like   | 
expr | 
 An expression that generates a langevitour, usually a block of code ending with a call to   | 
env | 
 The environment in which to evaluate   | 
quoted | 
 Is   | 
library(shiny)
library(palmerpenguins)
completePenguins <- na.omit(penguins[,c(1,3,4,5,6)])
scale <- apply(completePenguins[,-1], 2, sd)*4
ui <- fluidPage(
    sliderInput('zoom', 'Zoom', 0, min=-1, max=1, step=0.1),
    langevitourOutput('widget')
)
server <- function(input,output) { 
    output$widget <- renderLangevitour({
        langevitour(
            completePenguins[,-1], 
            completePenguins$species, 
            scale=scale * 10^input$zoom, pointSize=2)
    })
}
app <- shinyApp(ui, server)
# Use runApp(app) or runGadget(app) to run app.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.