View source: R/visualization.R
setFplot_distr  R Documentation 
The default values of most arguments of plot_distr
can be
set with setFplot_distr
.
setFplot_distr(
sorted,
log,
top,
yaxis.num,
col,
border = "black",
mod.method,
within,
total,
at_5,
labels.tilted,
other,
cumul = FALSE,
centered = TRUE,
weight.fun,
int.categorical,
dict = NULL,
mod.title = TRUE,
labels.angle,
cex.axis,
trunc = 20,
trunc.method = "auto",
reset = FALSE
)
getFplot_distr()
sorted 
Logical: should the first elements displayed be the most frequent? By default this is the case except for numeric values put to log or to integers. 
log 
Logical, only used when the data is numeric. If 
top 
What to display on the top of the bars. Can be equal to "frac" (for
shares), "nb" or "none". The default depends on the type of the plot. To disable
it you can also set it to 
yaxis.num 
Whether the yaxis should display regular numbers instead of
frequencies in percentage points. By default it shows numbers only when the data
is weighted with a different function than the sum. For conditionnal distributions,
a numeric yaxis can be displayed only when 
col 
A vector of colors, default is close to paired. You can also use “set1” or “paired”. 
border 
Outer color of the bars. Defaults is 
mod.method 
A character scalar: either i) “split”, the default for
categorical data, ii) “side”, the default for data in logarithmic form
or numeric data, or iii) “stack”. This is only used when there is more
ù than one moderator. If 
within 
Logical, default is missing. Whether the distributions should be
scaled to reflect the distribution within each moderator value. By default it
is 
total 
Logical, default is missing. Whether the distributions should be
scaled to reflect the total distribution (and not the distribution within each
moderator value). By default it is 
at_5 
Equal to 
labels.tilted 
Whether there should be tilted labels. Default is 
other 
Logical. Should there be a last column counting for the observations
not displayed? Default is 
cumul 
Logical, default is 
centered 
Logical, default is 
weight.fun 
A function, by default it is 
int.categorical 
Logical. Whether integers should be treated as categorical variables. By default they are treated as categorical only when their range is small (i.e. smaller than 1000). 
dict 
A dictionnary to rename the variables names in the axes and legend.
Should be a named vector. By default it s the value of 
mod.title 
Character scalar. The title of the legend in case there is a
moderator. You can set it to 
labels.angle 
Only if the labels of the xaxis are tilted. The angle of the tilt. 
cex.axis 
Cex value to be passed to biased labels. By defaults, it finds automatically the right value. 
trunc 
If the main variable is a character, its values are truncaded to

trunc.method 
If the elements of the xaxis need to be truncated, this is the truncation method. It can be "auto", "right" or "mid". 
reset 
Logical scalar, default is 
The function setFplot_distr()
does not return anything, it only sets the default
parameters for the function plot_distr()
.
The function getFplot_distr()
returns a named list containing the arguments
that have been set with the function setFplot_distr()
.
plot_distr
, pdf_fit
, fit.off
.
# Changing the default color set for plot_distr only
my_col = c("#36688D", "#F3CD05", "#F49F05", "#F18904", "#BDA589")
setFplot_distr(col = my_col, mod.method = "split", border = NA)
plot_distr(~ Petal.Length  Species, iris)
# Back to normal
setFplot_distr(reset = TRUE)
plot_distr(~ Petal.Length  Species, iris)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.