ndtvAnimationWidget {ndtv}R Documentation

htmlwidgets wrapper functions for including ndtv-d3 animations in shinyapps

Description

Wrapper functions to provide ndtv-d3 animation as an htmlwidgetfor use within an RStudio "shiny" web application. These functions are not normally called by R users directly. For example shiny app template code please see the 'server.R' and 'ui.R' files at https://github.com/statnet/ndtv/tree/master/htmlWidgetShinyTest

Usage

ndtvAnimationWidget(out, options, width = NULL, height = NULL)

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

ndtvAnimationWidgetOutput(outputId, width = "100%", height = "500px")

Arguments

out

the data structure describing the network animation. produced internally by render.d3movie

options

usually the 'd3.options' from render.d3movie

width

Display width for the widget. Must be a valid CSS unit (like "100%", "400px", "auto") or a number, which will be coerced to a string and have "px" appended.

height

Display eight for the widget. Must be a valid CSS unit (like "100%", "400px", "auto") or a number, which will be coerced to a string and have "px" appended.

outputId

See htmlwidgets-shiny

expr

An expression that does any necessary network processing and generates an HTML widget (usually via render.d3move). See htmlwidgets-shiny

env

The environment in which to evaluate expr. See htmlwidgets-shiny

quoted

Is expr a quoted expression (with quote())? This is useful if you want to save an expression in a variable. See htmlwidgets-shiny

Details

The ndtv-d3 interactive HTML5 network animation can normally be produced via render.d3movie(...,output.mode='htmlWidget'). These functions are wrappers to make it possible to embed the animations as part of a 'Shiny' (https://shiny.posit.co/) web application.

renderNdtvAnimationWidget should be used as the wraper for the render.d3movie call within the app's server.R file and ndtvAnimationWidgetOutput is the corresponding ui component to include in the ui.R file. See htmlwidgets-shiny

ndtvAnimationWidget initializes the widget, usually called automatically inside render.d3movie when output.mode='htmlWidget'.

Author(s)

skyebend@uw.edu

See Also

htmlwidgets-package, render.d3movie


[Package ndtv version 0.13.4 Index]