ivar {iplots} | R Documentation |
The following functions are used to mainpulate variables for iplots:
ivar.data
returns the data associated with an iVar
variable
ivar.new
creates a new iVar
variable in the current
iSet
using the supplied data
ivar.update
replaces the content of a variable
iset.df
pushes an entire data frame into corresponding
iVar
variables
iset.updateVars
notifies all plots that variables have been
changed. This function should not be normally used, because
notification happens automatically, unless batch updates are
performed.
ivar.data(var) ivar.new(name = deparse(substitute(cont)), cont) ivar.update(var, cont, batch = FALSE) iset.df(df) iset.updateVars()
var |
an existing iVar variable |
cont |
desired contents - usually a numeric vector or a factor |
name |
name of the newly created variable as it will appear in
the iSet and all plots |
batch |
if set to TRUE then plots are not automatically
notified about the change. This allows an update of multiple variables
in batches without constant re-painting of the plots. |
df |
a data frame whose columns will be converted into
iVar s |
All data that will are displayed in an iPlot are organized in
iSet
s. Each iSet
contains variables, called
iVar
s, that represent the displayed data. Typically an
iSet
corresponds to a data frame and an iVar
corresponds
to a column in a data frame. All variables in one iSet
must
have the same length and indexing order. This allows iPlots to perform
proper linking of all plots.
Before some data can be displayed in an iPlot, they are put into an
ivar
using the ivar.new
function. Each variable has a
name that is unique within an iSet
. This process is automatic
if you pass arbitrary vectors to the iPlots plotting
functions. However, it is possible (and desirable) to register
variables beforehand. iset.df
can be used to convert an entire
data frame into iVar
s. It is much faster to use iVar
s in
the plots instead of the raw data.
Once an iVar
is created, it is merely a reference to the data
in the iSer
. The ivar.data
function can be used to
retrieve that data.
In addition, it is possible to update the contents of an iVar
using the ivar.update
function. Once the variable is updated,
all plots that use the variable will be updated, too, and reflect the
change, unless batch
was set to TRUE
. The notification
is performed using the iset.updateVars
function.
iset.df
, ibar
, iplot.list
,
iplot.opt