plot_corr: Plot Correlation Matrix

Description Usage Arguments Value Examples

View source: R/plot_corr.R

Description

A function that generates a pearson correlation plot for a list of numeric features in a given data frame.

Usage

1
plot_corr(df, features = NULL)

Arguments

df

The input data frame for plotting.

features

A vector of characters that represents the features names. By default, NULL (returns the correlation plot of all numeric features).

Value

ggplot object, a correlation plot that illustrates the correlation between numeric features interactively.

Examples

1
2
3
numerical_features <- c('Sepal.Length','Sepal.Width','Petal.Width')

plot_corr(iris, features = numerical_features)

UBC-MDS/snapedautilityR documentation built on Feb. 5, 2022, 10:35 p.m.