gg_ccc | R Documentation |
Plot of raw data with line of best fit and CCC
gg_ccc(
data,
x,
y,
hor = "left",
ver = "top",
shift_x = 0,
shift_y = 0,
table_font_size = 5,
table_font_gap = 2.5,
fixed_coord = TRUE,
equal_axes_length = TRUE,
ggdraw_y_shift = NULL,
ggdraw_x = 0.25,
ggdraw_text_size = 14,
add_label = FALSE,
label_size = 2.5,
axis_lab_vec = NULL,
title = NULL
)
data |
dataframe. |
x, y |
numeric vectors or characters. If numeric vectors, then they specify the x- and y-
plotting variables, respectively. If characters, then they are taken to specify
the columns containing the x- and y-variables in |
hor |
'left' or 'right'. Specifies horizontal position of summary statistic table.
Default is |
ver |
'top' or 'bottom'. Specifies vertical position of summary statistic table.
Default is |
shift_x |
numeric. Percentage of x-axis range to shift summary statistic table.
If positive, then the table is shifted to the right. For example, |
shift_y |
numeric. Analogous to |
table_font_size |
numeric. Size of font for summary statistic table. |
table_font_gap |
numeric. Percentage of range of y-axis that rows in table are separated by. |
fixed_coord |
logical. If |
equal_axes_length |
logical. If |
ggdraw_y_shift |
numeric. Provides the increase in the y-coordinate from
one table entry to the next. A reasonable value is 0.03. Default is |
ggdraw_x |
numeric. X-axis coordinate for ggdraw text. Default is 0.25. |
ggdraw_text_size |
numeric. Font size for ggdraw text. Default is 14. |
add_label |
logical. If |
title |
character. Title to give plot. Default is |
The following summary statistics are printed on the plot:
Concordance CC: est (95% CI)
Pearson's CC: est (95% CI)
Intercept: est (95% CI)
Slope: est (95% CI)
A ggplot2
plot with the following elements:
raw data plotted
black 45 degree line
blue linear line of best fit (estimate + confidence bands)
table of relevant summary statistics.
data( test_tbl )
gg_ccc( test_tbl )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.