renderWidget: Renders a widget

Description Usage Arguments Details Value Note Examples

View source: R/renderWidget.R

Description

Renders the complete widget or a element of it.

If the parameter lang is not NULL then it should contain the number of the selected language, usually it will be the input[[getInputs(language widget)]]. If the parameter session is not NULL and the value of a slider element is set to "session" then the starting value is taken from the URL.

Usage

1
renderWidget(env, session = NULL, elem = NULL)

Arguments

env

widget

session

session parameter of the server function

elem

element of widget to render, if NULL the whole widget will be rendered

Details

E.g. let l <- widgetLanguage('lang') then the input element will be called lang.language. Calling the Shiny app with http://...?lang.language=2 will result that app start with second language as default rather then with the first.

Value

HTML code which can be used instead of renderUI

Note

A starting value of a widget element by URL can be only set at the beginning of session. Reloading the page will NOT start a new shiny session.

Examples

1
2
3
4
5
6
7
8
9
w <- widgetFontSize('widget')
renderWidget(w)

## Not run: 
  # Open in browser and add "?widget.size=11" to the URL to set the starting
  # value to 11
  shinyDemo('testBinomialSession')

## End(Not run)

sigbertklinke/mmstat documentation built on May 14, 2019, 8:36 a.m.