Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

as_d3_data

Convert object to D3 data


Description

Generic method to transform R objects into D3 friendly data.

Usage

as_d3_data(x, ...)

## Default S3 method:
as_d3_data(x, ...)

Arguments

x

data

...

Additional arguments for generic methods

Details

The value returned from as_d3_data() should be one of:

  • An R data frame. In this case the HTMLWidgets.dataframeToD3() JavaScript function will be called on the client to transform the data into D3 friendly (row-oriented) data; or

  • A JSON object created using jsonlite::toJSON; or

  • Any other R object which can be coverted to JSON using jsonlite::toJSON.


r2d3

Interface to 'D3' Visualizations

v0.2.5
BSD_3_clause + file LICENSE
Authors
Nick Strayer [aut, cre], Javier Luraschi [aut], JJ Allaire [aut], Mike Bostock [ctb, cph] (d3.js library, http://d3js.org), RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.