# NOT RUN {
######################################################################
# Testing the bi-variate case (heat map). Example: synthetic data!
# Fig. 4 in Polanco-Mart<U+00ED>nez (2020)
test_fun2 <- rolwincor_heatmap(syntDATA, varX="X", varY="Y",
CorMethod="spearman", typewidthwin="PARTIAL",
widthwin_1=11, widthwin_N=101, Align="center")
# Plotting the bi-variate case (heat map). Example: synthetic data!
plot_heatmap(syntDATA, test_fun2$matcor, test_fun2$pvalscor, test_fun2$left_win,
test_fun2$righ_win, test_fun2$Windows, KCASE="BIVAR",
typewidthwin="PARTIAL", varX="X", varY="Y", widthwin_1=11,
widthwin_N=101)
######################################################################
# Testing the bi-variate case (heat map). Example: real-life ecological data
######################################################################
# Fig. 5 (left) in Polanco-Mart<U+00ED>nez (2020)
SST_PC1 <- rolwincor_heatmap(YX_ecological_data[,c(1,3,2)], varX="SST",
varY="PC1", CorMethod="spearman", typewidthwin="FULL",
Align="center", pvalcorectmethod="BH")
# Plotting the bi-variate case (heat map). Example: real-life ecological data
plot_heatmap(YX_ecological_data[,c(1,3,2)], SST_PC1$matcor, SST_PC1$pvalscor,
SST_PC1$left_win, SST_PC1$righ_win, SST_PC1$Windows, KCASE="BIVAR",
typewidthwin="FULL", varX="SST", varY="PC1", coltsX="red", CEXLAB=1.15,
CEXAXIS=1.65, coltsY="black", LWDtsX=2, LWDtsY=2)
######################################################################
# Testing the multi-variate case (heat map). Example: real-life ecological data
######################################################################
# Fig. 6 in Polanco-Mart<U+00ED>nez (2020)
SST_TSI_PC1 <- rolwinmulcor_heatmap(YX_ecological_data, typewidthwin="FULL",
Align="center", pvalcorectmethod="BH")
# Plotting the multi-variate case (heat map). Example: real-life ecological data
plot_heatmap(YX_ecological_data, SST_TSI_PC1$matcor, SST_TSI_PC1$pvalscor,
SST_TSI_PC1$left_win, SST_TSI_PC1$righ_win, Rwidthwin=SST_TSI_PC1$Windows,
KCASE="MULVAR", typewidthwin="FULL", varY="PC1", varX=c("SST", "TSI"),
coltsY="black", coltsX=c("red", "orange"), CEXLAB=1.15, CEXAXIS=1.65,
LWDtsX=rep(2,2), LWDtsY=2, parcen=c(0.45,15))
# }
Run the code above in your browser using DataLab