plotlySave saves a plotly graphic with name foo.png where foo is
the name of the current chunk. You must have a free plotly account
from plot.ly to use this function, and you must have run
Sys.setenv(plotly_username="your_plotly_username") and
Sys.setenv(plotly_api_key="your_api_key"). The API key can be found
in one's profile settings. See
http://stackoverflow.com/questions/33959635/exporting-png-files-from-plotly-in-r.
Usage
plotlySave(x, ...)
Value
called for its side effect of writing one or more PNG files;
returns invisible(NULL)
Arguments
x
a plotly graphics object or a named list of such objects.
The resulting png file will go in the file path given by the
knitrfig.path value, and have a base name equal to the current
knitr chunk name. If x is a list, a minus sign followed by the
chunk name are inserted before .png.