geom_mark | R Documentation |
layer function to add significant marks on a plot.
geom_mark(
mapping = NULL,
data = NULL,
stat = "identity",
position = "identity",
...,
nudge_x = 0,
nudge_y = 0,
digits = 2,
nsmall = 2,
only_mark = FALSE,
sig_level = c(0.05, 0.01, 0.001),
mark = c("*", "**", "***"),
sig_thres = NULL,
sep = "",
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE
)
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
stat |
The statistical transformation to use on the data for this
layer, either as a |
position |
Position adjustment, either as a string naming the adjustment
(e.g. |
... |
Other arguments passed on to |
nudge_x, nudge_y |
Horizontal and vertical adjustment to nudge labels by.
Useful for offsetting text from points, particularly on discrete scales.
Cannot be jointly specified with |
digits |
integer indicating the number of decimal places (round) or significant digits (signif) to be used, the default value is 2. |
nsmall |
the minimum number of digits to the right of the decimal point in formatting real/complex numbers in non-scientific formats, the default value is 2. |
only_mark |
if TRUE, only the significant marks add on the plot. |
sig_level |
significance level,the default values is [0.05, 0.01, 0.001]. |
mark |
significance mark,the default values is ["*", "**", "***"]. |
sig_thres |
if not NULL, just when pvalue is not larger than sig_thres will be ploted. |
sep |
a character string to separate the number and mark symbols. |
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
geom_mark()
understands the following aesthetics (required
aesthetics are in bold):
x
y
pvalue
r
alpha
colour
size
angle
hjust
vjust
family
fontface
lineheight
correlate(mtcars) %>%
qcorrplot() + geom_mark()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.