plotDens: Creates a density plot for one/ all numerical features(s) of...

Description Usage Arguments Value Examples

Description

Creates a Density plot of a numerical feature or all numerical features of a dataset .

Usage

1
2
plotDens(data, target, col = NULL, show.plot = FALSE, alpha = 0.4,
  colour = "black", ...)

Arguments

data

[data.frame]
Data.

target

[character(1)]
Target column. If no target is available in the dataset please insert NULL

col

[character(1) | integer(1)]
Selected feature from data. If all numerical features should be printed insert NULL. Default value is NULL

show.plot

[logical(1)]
Logical whether the ggplot(s) should be displayed or not when executing this function. Default is FALSE

alpha

[numeric(1)]
Default is alpha = 0.4

colour

[character(1)]
Default is colour = "black"

...

other arguments to be passed to geom_density.

Value

A ggplot2 object. Print it to plot it. [WIP if col is null]

Examples

1
2
3
 data("Boston", package = "MASS")
 gghistplot = plotDens(Boston, target = "medv", col = "age")
 gghistAllplot = plotDens(Boston, target = "medv", col = NULL)

ptl93/AEDA documentation built on May 7, 2019, 3:20 p.m.