View source: R/02_data_preparation.R
uni.histograms | R Documentation |
The uni.histograms
function draws, within a single panel, an independent histogram
or each numeric (continuous or discrete) variable in a given dataset. It is particularly useful
for data exploration (e.g. Zuur et al., 2010). For instance, to simultaneously observe
the distributions of all numeric variables and determine which one will require transformation.
uni.histograms(
dataset,
MAR = c(3, 2, 0.5, 1.5),
CEX.LAB = 1.2,
FONT.LAB = 2,
BTY = "n",
FG = "gray35",
COL.AXIS = "gray35",
COL.LAB = "gray20",
CEX.PAR = 0.6,
TCL = -0.3,
MGP = c(1.7, 0.6, 0.1),
OMA = c(1, 0, 1, 0),
LAB = c(5, 10, 7),
BREAKS = 10,
COL = "moccasin",
BORDER = "white"
)
dataset |
The input dataset containing all variables to be plotted (must be a |
MAR |
A numerical vector of the form |
CEX.LAB |
The magnification to be used for x and y labels relative to the current setting
of |
FONT.LAB |
The font to be used for x and y labels. |
BTY |
A character string which determined the type of box which is drawn about plots. If |
FG |
The color to be used for the foreground of plots. This is the default color used for things like axes and boxes around plots (defaults to "gray35"). |
COL.AXIS |
The color to be used for axis annotation. Defaults to "gray35". |
COL.LAB |
The color to be used for x and y labels. Defaults to "gray20". |
CEX.PAR |
A numerical value giving the amount by which plotting text and symbols should be
magnified relative to the default (for |
TCL |
The length of tick marks as a fraction of the height of a line of text. The default value is -0.3. |
MGP |
The margin line (in |
OMA |
A vector of the form |
LAB |
A numerical vector of the form |
BREAKS |
One of:
In the last three cases the number is a suggestion only; as the breakpoints will be set to pretty values, the number is limited to 1e6 (with a warning if it was larger). If breaks is a function, the x vector is supplied to it as the only argument (and the number of breaks is only limited by the amount of available memory). |
COL |
The color of the bar of the histograms (bins). |
BORDER |
The color of the border of the bars. |
A panel of histograms.
uni.histograms(dataset = iris[,1:4])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.