This function plots the 95
correlation coefficient generated by the function corr_ci
.
plot_ci( object, x.lab = NULL, y.lab = NULL, y.lim = NULL, y.breaks = waiver(), shape = 21, col.shape = "black", fill.shape = "orange", size.shape = 2.5, width.errbar = 0.5, main = TRUE, invert.axis = TRUE, reorder = TRUE, plot_theme = theme_metan() )
object | An object generate by the function |
---|---|
x.lab | The label of x-axis, set to 'Pairwise combinations'. New
arguments can be inserted as |
y.lab | The label of y-axis, set to 'Pearson's correlation coefficient'
New arguments can be inserted as |
y.lim | The range of x-axis. Default is |
y.breaks | The breaks to be plotted in the x-axis. Default is
|
shape | The shape point to represent the correlation coefficient.
Default is |
col.shape | The color for the shape edge. Set to |
fill.shape | The color to fill the shape. Set to |
size.shape | The size for the shape point. Set to |
width.errbar | The width for the errorbar showing the CI. |
main | The title of the plot. Set to |
invert.axis | Should the names of the pairwise correlation appear in the y-axis? |
reorder | Logical argument. If |
plot_theme | The graphical theme of the plot. Default is
|
An object of class gg, ggplot
.
# \donttest{ library(metan) library(dplyr) data_ge2 %>% select(contains('E')) %>% corr_ci() %>% plot_ci()#> # A tibble: 21 x 6 #> Pair Corr n CI LL UL #> <chr> <dbl> <int> <dbl> <dbl> <dbl> #> 1 EH x EP 0.870 156 0.0901 0.779 0.960 #> 2 EH x EL 0.363 156 0.135 0.228 0.497 #> 3 EH x ED 0.630 156 0.109 0.521 0.739 #> 4 EH x CDED -0.0659 156 0.170 -0.236 0.104 #> 5 EH x PERK -0.0213 156 0.176 -0.198 0.155 #> 6 EH x NKE 0.388 156 0.132 0.256 0.520 #> 7 EP x EL 0.263 156 0.146 0.118 0.409 #> 8 EP x ED 0.458 156 0.125 0.333 0.583 #> 9 EP x CDED 0.0897 156 0.167 -0.0775 0.257 #> 10 EP x PERK -0.0871 156 0.167 -0.255 0.0804 #> # ... with 11 more rows# }