47 lines
1.1 KiB
R
47 lines
1.1 KiB
R
dashboard_ggpairs=function(
|
||
plot_df, plot_title
|
||
, tt_args_size = 2.5
|
||
, gp_args_size = 2.5
|
||
){
|
||
ggpairs(
|
||
plot_df,
|
||
columns = 1:(ncol(plot_df)-1),
|
||
upper = list(
|
||
continuous = wrap(
|
||
'cor', # ggally_cor()
|
||
method = "spearman",
|
||
use = "pairwise.complete.obs",
|
||
title="ρ",
|
||
digits=2,
|
||
justify_labels = "centre",
|
||
title_args=list(size=tt_args_size, colour="black"),#2.5
|
||
group_args=list(size=gp_args_size)#2.5
|
||
)
|
||
),
|
||
lower = list(
|
||
continuous = wrap("points",
|
||
alpha = 0.7,
|
||
size=0.125),
|
||
combo = wrap("dot",
|
||
alpha = 0.7,
|
||
size=0.125)
|
||
),
|
||
aes(
|
||
colour = factor(
|
||
ifelse(
|
||
dst_mode==0,
|
||
"S",
|
||
"R"
|
||
)
|
||
),
|
||
alpha = 0.5
|
||
),
|
||
title=plot_title
|
||
) +
|
||
|
||
scale_colour_manual(values = c("red", "blue")) +
|
||
scale_fill_manual(values = c("red", "blue")) #+
|
||
# theme(text = element_text(size=7,
|
||
# face="bold"))
|
||
}
|
||
|