circleCor {visCorVar} | R Documentation |
Performs the overlaying of correlation circles and retrieves selected block variables and performs a zoom in the correlation circle.
circleCor( list_dataframe_cor_comp_var_global, list_vec_index_block_select, mat_cor_comp1, mat_cor_comp2, names_blocks, names_response_variables, comp = 1:2, cutoff = 0.85, min.X = -1, max.X = 1, min.Y = -1, max.Y = 1, vec_col = colorRampPalette(brewer.pal(9, "Spectral"))(dim(mat_cor_comp1)[1] + 1), rad.in = 0.5, cex = 0.7, cex_legend = 0.8, pos = c(1.2, 0), pch = 20 )
list_dataframe_cor_comp_var_global |
type list of dataframes. For the ith group of blocks, list_cor_comp_selected_var_resp_var contains the correlations between the components and the selected block variables and the response variables. |
list_vec_index_block_select |
type : list of integer. This list contains the indices of the blocks whose correlation circles can be overlaid. |
mat_cor_comp1 |
type : matrix. mat_cor_comp1 is the correlation matrix between the components of index comp[1]. |
mat_cor_comp2 |
type : matrix. mat_cor_comp2 is the correlation matric between the components of index comp[2]. |
names_blocks |
type : characters vector. names_blocks contains the blocks names whose the correlation circles will be overlaid. |
names_response_variables |
type : characters vector. names_response_variables contains the names of the response variables that will be plotted in the correlation circle. |
comp |
integer vectors. comp contains the indices of the components used in the correlation circle. Default comp = 1:2 . |
cutoff |
type : numeric. The selected block variables whose correlation between comp[1] component or comp[2] component is greater thant cutoff in absolute value will be plotted. |
min.X |
type : numeric. min.X is the lower bound of the rectangle for the X axis. |
max.X |
type : numeric. max.X is the upper bound of the rectangle for the X axis. |
min.Y |
type : numeric. min.Y is the lower bound of the rectangle for the Y axis. |
max.Y |
type : numeric. max.Y is the upper bound of the rectangle for the Y axis. |
vec_col |
type : character vector. The ith coordinate of vec_col is the color of the selected block variables of the ith block. |
rad.in |
type : numeric. rad.in is the radius of inner circle. |
cex |
type : numeric. cex is the size of the selected block variables plotted in the correlation circle. |
cex_legend |
type : numeric. cex_legend is the size of the block names in the legend. |
pos |
type : numeric. pos enables to position the legend. |
pch |
type : integer. pch specifies the points type in the legend. |
The function circleCor performs the overlaying of correlation circles if these correlation circles can be overlaid. This function performs a zoom in a rectangle of the correlation circle and plots only the selected block variables contained in this rectangle. These selected block variables in this rectangle are in the output of the function circleCor.
type : character vector. The output of the function circleCor contains the selected blocks variables contained in the rectangle.
library(RColorBrewer) load(system.file("extdata", "res_data_integration.rda", package="visCorVar")) load(system.file("extdata", "block_Y.rda", package="visCorVar")) load(system.file("extdata", "var_interest.rda", package="visCorVar")) comp = 1:2 cutoff_comp = 0.8 res_matCorAddVar = matCorAddVar(res_data_integration, block_Y, cutoff_comp, var_interest, comp) list_cor_comp_selected_var_resp_var = res_matCorAddVar$list_cor_comp_selected_var_resp_var list_vec_index_block_select = res_matCorAddVar$list_vec_index_block_select mat_cor_comp1 = res_matCorAddVar$mat_cor_comp1 mat_cor_comp2 = res_matCorAddVar$mat_cor_comp2 names_blocks = c("X1", "X3") names_response_variables = c("A", "B") comp = 1:2 select_block_variable = circleCor(list_cor_comp_selected_var_resp_var, list_vec_index_block_select, mat_cor_comp1, mat_cor_comp2, names_blocks, names_response_variables, comp, 0.85, -1, 1, -1, 1, colorRampPalette(brewer.pal(9, "Spectral"))(dim(mat_cor_comp1)[1] + 1), rad.in = 0.5, 0.7, 0.8, c(1.2, 0), 20)