Learn R Programming

freewall (version 1.0.0)

freewall-shiny: Shiny bindings for 'freewall'

Description

Output and render functions for using freewall within Shiny applications and interactive Rmd documents.

Usage

freewallOutput(outputId, width = "100%", height = "auto")

renderFreewall(expr, env = parent.frame(), quoted = FALSE)

Value

freewallOutput returns an output element that can be included in a Shiny UI definition, and renderFreewall returns a

shiny.render.function object that can be included in a Shiny server definition.

Arguments

outputId

output variable to read from

width, height

a valid CSS dimension (like "100%", "400px", "auto") or a number, which will be coerced to a string and have "px" appended

expr

an expression that generates a freewall

env

the environment in which to evaluate expr

quoted

logical, whether expr is a quoted expression (with quote()); this is useful if you want to save an expression in a variable

Examples

Run this code
if(require(shiny) && interactive()) {
library(shiny)
library(freewall)

ui <- fluidPage(
  freewallOutput("fw")
)

server <- function(input, output, session) {
  output$fw <- renderFreewall({
    freewall(alphabet(), widths = 200, cellW = 200, cellH = "auto")
  })
}

shinyApp(ui, server)
}

Run the code above in your browser using DataLab