Plot correlation

cor_plot(
  env,
  env2 = NULL,
  geom = ggcor::geom_square,
  mode = 1,
  method = "pearson",
  mode_param = NULL,
  colors = get_cols(pal = "bluered")[2:10]
)

Arguments

env

dataframe1

env2

dataframe2 (default:NULL)

geom

geom, default: geom_square

mode

plot mode (1~4)

method

one of "pearson","kendall","spearman"

mode_param

parameters parse to geom (mode=1~2) or corrplot (mode=3)

colors

color, default is get_cols(pal="bluered")[2:10]

Value

ggplot

Examples

# \donttest{
if (interactive()) {
  data(otutab)
  cor_plot(metadata[, 3:10])
  cor_plot(metadata[, 3:10], mode = 2)
  cor_plot(metadata[, 3:10], mode = 3)
  cor_plot(t(otutab)[, 1:50], mode = 4)
}
# }