exportHTML: ExportHTML

Description Usage Arguments Value Methods (by class) Author(s) Examples

View source: R/exportHTML.R

Description

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.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
exportHTML(x, file, data, local = FALSE, extra.vars, ...)

## S3 method for class ''function''
exportHTML(
  x,
  file = "index.html",
  data = NULL,
  local = FALSE,
  extra.vars = NULL,
  width = dev.size()[1],
  height = dev.size()[2],
  ...
)

## S3 method for class 'ggplot'
exportHTML(
  x,
  file = "index.html",
  data = NULL,
  local = FALSE,
  extra.vars = NULL,
  mapObj,
  ...
)

## S3 method for class 'inzplotoutput'
exportHTML(
  x,
  file = "index.html",
  data = NULL,
  local = FALSE,
  extra.vars = NULL,
  ...
)

Arguments

x

An iNZight plot object that captures iNZight environment

file

Name of temporary HTML file generated

data

dataset/dataframe that you wish to investigate and export more variables from

local

Logical for creating local files for offline use (default to false) Additional parameters for scatterplots and dotplots only:

extra.vars

extra variables specified by the user to be exported

...

extra arguments

width

the desired width of the SVG plot

height

the desired height of the SVG plot

mapObj

iNZightMap object (from iNZightMaps)

Value

HTML file of x with filename file in the browser

Methods (by class)

Author(s)

Yu Han Soh

Examples

1
2
3
4
5
6
7
8
## Not run: 
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"))

## End(Not run)

iNZightVIT/iNZightPlots documentation built on Jan. 26, 2020, 9:06 p.m.