inzplot | R Documentation |
A generic function used to plot objects within the iNZight ecosystem.
inzplot(x, ..., env = parent.frame())
## S3 method for class 'formula'
inzplot(x, data = NULL, design = NULL, ..., env = parent.frame())
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 |
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
.
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
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"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.