exportHTML is designed to export the iNZight plot as a dynamic, interactive HTML page.
Currently only handles single panel plots. Coloured hex plots are currently not available yet.
exportHTML(
x,
file = file.path(dir, "index.html"),
data,
local = FALSE,
dir = tempdir(),
extra.vars,
...
)
# S3 method for `function`
exportHTML(
x,
file = file.path(dir, "index.html"),
data = NULL,
local = FALSE,
dir = tempdir(),
extra.vars = NULL,
width = dev.size()[1],
height = dev.size()[2],
...
)
# S3 method for ggplot
exportHTML(
x,
file = file.path(dir, "index.html"),
data = NULL,
local = FALSE,
dir = tempdir(),
extra.vars = NULL,
mapObj,
...
)
# S3 method for inzplotoutput
exportHTML(
x,
file = file.path(dir, "index.html"),
data = NULL,
local = FALSE,
dir = tempdir(),
extra.vars = NULL,
...
)An iNZight plot object that captures iNZight environment
Name of temporary HTML file generated (defaults to `index.html` in a temporary directory, or other as specified using `dir`)
dataset/dataframe that you wish to investigate and export more variables from
Logical for creating local files for offline use (default to false)
A directory to store the file and output
extra variables specified by the user to be exported
extra arguments
the desired width of the SVG plot
the desired height of the SVG plot
iNZightMap object (from iNZightMaps)
an inzHTML object consisting of a link to an HTML rendering
of x with filename file,
which can be loaded in the browser (for example using browseURL,
or calling the print() method of the returned object.
exportHTML(`function`): method for an iNZightPlot-generating function
exportHTML(ggplot): method for iNZightMaps or other supported ggplot graphs
exportHTML(inzplotoutput): method for output from iNZightPlot
if (FALSE) {
x <- iNZightPlot(Petal.Width, Petal.Length, data = iris, colby = Species)
exportHTML(x, "index.html")
#to export more variables for scatterplots:
exportHTML(x, "index.html", data = iris, extra.vars = c("Sepal.Length", "Sepal.Width"))
}