inzplot {iNZightPlots} | R Documentation |
iNZight Plot Method
Description
A generic function used to plot objects within the iNZight ecosystem.
Usage
inzplot(x, ..., env = parent.frame())
## S3 method for class 'formula'
inzplot(x, data = NULL, design = NULL, ..., env = parent.frame())
Arguments
x |
A formula in the form of |
... |
Any arguments to pass to |
env |
the parent environment to pass to the plot function |
data |
Dataset to plotq |
design |
A survey design to use |
Details
inzplot
is a simple wrapper around the iNZightPlot
function.
There are four options for the formula passed in:
y
will produce a plot of the single variable y
.
y ~ x
will produce a plot of y
against x
.
y ~ x | g1
will produce a plot of y
against x
subset by g1
.
y ~ x | g1 + g2
will produce a plot of y
against x
subset by g1
and g2
.
Value
The output depends on the type of input, but is usually called for the side-effect of producing a plot.
An inzightplotoutput
object, which contains the information
displayed in the plot
See Also
iNZightPlot
Examples
data("CO2")
inzplot(~uptake, data = CO2)
inzplot(uptake ~ Treatment, data = CO2)
inzplot(uptake ~ Treatment | Type, data = CO2)
inzplot(uptake ~ Treatment | Type,
data = CO2, g1.level = "Quebec"
)