R/eikos.R
eikos.formula.RdDraw eikosogram using a formula to identify response and conditioning variates
# S3 method for class 'formula'
eikos(
y,
x = NULL,
data = NULL,
marginalize = NULL,
main = "",
main_size = 16,
ylabs = TRUE,
ylab_rot = 0,
yname_size = 12,
yvals_size = 12,
yaxs = TRUE,
yprobs = NULL,
yprobs_size = 8,
xlabs = TRUE,
xlab_rot = 0,
xname_size = 12,
xvals_size = 12,
xaxs = TRUE,
xprobs = NULL,
xprobs_size = 8,
vertical_xprobs = TRUE,
ispace = list(bottom = 8, left = 2, top = 2, right = 5),
legend = FALSE,
col = NULL,
bottomcol = "steelblue",
topcol = "snow2",
lcol = "black",
draw = TRUE,
newpage = TRUE,
lock_aspect = TRUE
)Either the name of a variable in the data set (eikos.default), or a formula of such variables (eikos.formula).
name(s) of any conditional variable(s) (horizontal axis). Should be null if formula given.
data frame or table
variable(s) to marginalize on, or NULL if none. Marginalized variables still appear in plot.
title of plot
font size of title (in points)
logical, whether y labels should appear or not.
rotation of y labels
font size of vertical axis names (in points)
font size of labels for values of y variable (in points)
logical, whether y axis should appear or not.
probabilities to be shown on y-axis. NULL if they should be calculated from the data.
font size of labels for horizontal probabilities (in points)
logical, whether x labels should appear or not.
rotation of x labels
font size of horizontal axis names (in points)
font size of labels for values of x variables (in points)
logical, whether x axis should appear or not.
probabilities to be shown on x-axis. NULL if they should be calculated from the data.
font size of labels for horizontal probabilities (in points)
logical, whether probabilities on x axis should be rotated vertically.
list of four items (bottom, left, top, right) indicating the margins separating the text around the diagram. Each value is a positive integer giving a measure in "points".
logical, whether to include legend
a vector of colours to match the response values. If NULL (the default), the colours are constructed as a smooth transition from `bottomcol` to `topcol` via `grDevices::colorRampPalette
bottom colour
top colour
colour of lines
logical, whether to draw eikosogram.
logical, whether to draw on a newpage.
logical, whether to force entire plot to 1:1 aspect ratio.
eikos(Eye ~ Hair + Sex, data=HairEyeColor)
eikos(Hair ~ ., data=HairEyeColor,
yaxs = FALSE, ylabs = FALSE,
legend = TRUE,
col = c("black", "sienna4",
"orangered", "lightgoldenrod" ))
eikos(Hair ~ ., data=HairEyeColor, xlab_rot = 30,
yprobs = seq(0.1, 1, 0.1),
yvals_size = 10,
xvals_size = 8,
ispace = list(bottom = 10),
bottomcol = "grey30", topcol = "grey70",
lcol = "white")
eikos(Hair ~ ., data=HairEyeColor, xlab_rot = 30,
marginalize = "Eye",
yvals_size = 10,
xvals_size = 8,
ispace = list(bottom = 10),
bottomcol = "grey30", topcol = "grey70",
lcol = "white")
eikos(Hair ~ ., data=HairEyeColor, xlab_rot = 30,
marginalize = c("Eye", "Sex"),
yvals_size = 10,
xvals_size = 8,
ispace = list(bottom = 10),
bottomcol = "grey30", topcol = "grey70",
lcol = "white")