extract_cor_tbl: Helper function to extract cor_tbl.

Description Usage Arguments Value Author(s) Examples

Description

These functions are used to quickly obtain the upper trig, lower trig, diagonal, or remove the diagonal of the correlation coefficient matrix.

Usage

1
2
3
4
5
6
7
8
9
get_lower_data(x, show.diag = TRUE)

get_upper_data(x, show.diag = TRUE)

get_diag_tri(x)

get_diag_data(x)

is_symmet(x)

Arguments

x

a cor_tbl object.

show.diag

a logical value indicating whether keep the diagonal.

Value

a modified cor_tbl object.

Author(s)

Houyun Huang, Lei Zhou, Jian Chen, Taiyun Wei

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
df <- fortify_cor(mtcars)
quickcor(df) + geom_colour()

## exclude upper
df %>% get_lower_data() %>%
  quickcor() + geom_colour()

## exclude lower
df %>% get_upper_data(show.diag = FALSE) %>%
  quickcor() + geom_colour()

## get the diagonal
df %>% get_diag_data() %>%
  quickcor() + geom_colour()

## exclude the diagonal
df %>% get_diag_tri() %>%
  quickcor() + geom_colour()

houyunhuang/ggcor documentation built on July 22, 2020, 8:31 p.m.