export_graph_start
and
export_graph_end
to export graphs. This is similar to the
family of functions pdf_fit
, png_fit
, etc, and
fit.off()
, but possibly more intuitive.plot_box
when a call of the form
plot_box(var ~ 1, base)
was used.plot_box
when a call of the form
plot_box(. ~ 1, base)
was used.pdftools::pdf_convert
popping when
exporting graphs.ggplot2
graph exportationA new set of functions has been created to easily export figures that should fit in a document.
The five functions are pdf_fit
,
png_fit
, jpeg_fit
, tiff_fit
and
bmp_fit
.
First, if needed, you set the geometry of your document with
setFplot_page
. Defaults to US-letter and normal
margins => this is used to deduce the size the figures will take in
the document.
When using pdf_fit
, instead of providing the height
and width of the figure in absolute terms, you provide the fraction of
the text-width the figure should take, and the target font-size at which
the plotting text should be rendered. The size of the plotting text,
once the figure is in the final document, is guaranteed.
Use fit.off
instead of dev.off
to close
the device and you will get the exported graph displayed in the viewer
pane! No need to open your file to see whether the export is proper, you
have it automatically done!
plot_distr
setFplot_distr
to set most default values
of the function plot_distr
.plot_distr
MAJOR CHANGE NOT RETRO COMPATIBLE: complete overhaul of the
formula. Now the main argument ‘fml’ is of the form
weights ~ var | moderator
(before it was
var ~ moderator | weights
). Allows to use one-sided
formulas.
Argument tick_5
becomes at_5
and can
take three values: FALSE, “roman” or “line”. It is used to inform on the
index of the bars by adding a small Roman number under every 5 bars
(at_5 = "roman"
), or drawing a thick axis line every 5 bars
(at_5 = "line"
). The default depends on the types of the
data.
When fractions are displayed on top of the bars, very low numbers are now trucated (avoids having to display too small numbers).
The name of the moderator is now displayed in the yaxis when appropriate for within distributions.
Legend titles are now always displayed by default.
You can display the distribution for several weights at the same time.
Argument mod.method
has been revamped. It’s meaning
has been split: mod.method
takes values in “side”, “split”
or “stack” and two new arguments within
and
total
have been created to define whether the distribution
should be within each moderator or over the total distribution.
The argument trunc.method
now takes the values
“auto”, “right” and “mid” (instead of “auto”, “trimRight” and
“trimMid”).
The size of the bottom and left margins are now automatically adjusted so the text always fit.
Argument mod.select
now supports regular
expressions.
New argument mod.NA
which display the distribution
of missing values.
plot_lines
mod.select
now supports regular
expressions.mod.NA
which display the distribution of
missing values.plot_box
fixest
is removed from help files and called
conditionnaly in the vignette.mod.method = "splitXX"
is now supported with
logarithmic datamod.method = "splitXX"
+ toLog=TRUE
: now
supports the “other” column.labels.tilted=TRUE
now possible with logarithmic
data.yaxis.num = TRUE
.yaxis.num = TRUE
in the presence of moderators could
cause problems in special cases.mod.method = "splitxx"
and factor
variables.mod.method = "sidexx"
and with the
other columns (problem in the bar cutting).bin
becomes bin.size
.mod.method
, the value within
and total
become sideWithin
and
sideTotal
.