A generic function used to plot objects within the iNZight ecosystem.
inzplot(x, ..., env = parent.frame())
# S3 method for formula
inzplot(x, data = NULL, design = NULL, ..., env = parent.frame())A formula in the form of y ~ x | g. See Details.
Any arguments to pass to iNZightPlot
the parent environment to pass to the plot function
Dataset to plotq
A survey design to use
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
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.
iNZightPlot
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"
)