plotar: Correlation plots

Description Usage Arguments Value Examples

View source: R/target_profiling.R

Description

Visual correlation analysis. Plot different graphs in order to expose the inner information of any numeric variable against the target variable

Usage

1
plotar(data, input, target, plot_type, path_out)

Arguments

data

data frame source

input

string input variable (if empty, it runs for all numeric variable), it can take a single character value or a character vector.

target

string of the variable to predict, it supports binary or multinominal values.

plot_type

Indicates the type of plot to retrieve, available values: "boxplot" or "histdens".

path_out

path directory, if it has a value the plot is saved. To save in current directory path must be dot: "."

Value

Single or multiple plots specified by 'plot_type' parameter

Examples

1
2
3
4
5
6
7
## Not run: 
## It runs for all numeric variables automatically
plotar(data=heart_disease, target="has_heart_disease", plot_type="histdens")

plotar(heart_disease, input = 'age', target = 'chest_pain', plot_type = "boxplot")

## End(Not run)

Example output

Loading required package: Hmisc
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2

Attaching package: 'Hmisc'

The following objects are masked from 'package:base':

    format.pval, units

funModeling v.1.7 :)
Examples and tutorials at livebook.datascienceheroes.com

Warning message:
Removed 4 rows containing non-finite values (stat_density). 

funModeling documentation built on July 1, 2020, 5:40 p.m.