Description Usage Arguments Value See Also Examples
Correlation plot from a data frame, a wrapper around corrplot::corrplot()
1 2 3 4 5 6 7 8 9 10 11 12 | corrplot_df(
df,
...,
method_cor = "pearson",
method_plot = "custom",
na.rm_type = "rows",
type = "upper",
tl.srt = 45,
tl.col = "black",
sig.level = 0.05,
insig = "blank"
)
|
df |
Data frame |
... |
Pass to |
method_cor |
Character: Specify method for calculate correlation; "pearson" (default), "spearman" or "kendall" |
method_plot |
Character: Specify plotting output; "custom" (default) other options are "circle", "square", "ellipse", "number", "shade", "color", "pie" . |
na.rm_type |
Character: If NA's is present in data frame, it will be removed by "rows"(default): any rows that has NA's or "cols" any column that has NA's. |
type |
Character: "upper" (default), "lower" or "full", display full matrix, lower triangular or upper triangular matrix. |
tl.srt |
Numeric: For text label string rotation in degrees. |
tl.col |
Character: Specify text color "black" (default) |
sig.level |
Numeric: P-value significant level, default = 0.05. |
insig |
Character: Character, specialized insignificant correlation coefficients, "pch" (default), "p-value", "blank", "n", or "label_sig". If "blank", wipe away the corresponding glyphs; if "p-value", add p-values the corresponding glyphs; if "pch", add characters (see pch for details) on corresponding glyphs; if "n", don't take any measures; if "label_sig", mark significant correlations with pch (see sig.level). |
Plot
corrplot
package
https://cran.r-project.org/web/packages/corrplot/vignettes/corrplot-intro.html
1 2 3 4 5 6 7 8 | # Plot correlation of numeric column
corrplot_df(iris)
mtcars %>%
corrplot_df(method_plot = "circle", # specify graphic method of correlation
type = "lower", # display lower half of correlation plot
sig.level = 0.01, # p-value = 0.01
insig = "pch") # insignificant p-value will be crossed out
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.