R and Plotly

In this example we will show you how to integrate our R code for generating Plotly figures into the R Code block and use the Plotly Chart block to display it.

For this use case please pay attention at the following points (see the code below):

  • there is no need to use install.packages because the missing packages are downloaded by default (see the first line of code below and the docs)
  • for converting the Plotly figure to a JSON use plotly_json (see line 6)
  • save the json as a json file (see line 7)

Now the JSON file is the output of our R Code, and used further for the JSON description of the Plotly Chart block.

is loading …
is loading …

First Published

in

Last Updated

Comments

Leave a Reply