plotHist: Creates a histogram plot for one/ all numerical features(s)...

Description Usage Arguments Value Examples

Description

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

Usage

1
2
plotHist(data, target, col = NULL, show.plot = FALSE, absolute = TRUE,
  alpha = 0.4, colour = "black", bins = 30L, ...)

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

absolute

[logical(1)]
Whether the histogramm should plot absolute or relative frequencies. Default is TRUE

alpha

[numeric(1)]
Default is alpha = 0.4

colour

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

bins

[integer(1)]
Default is bins = 30L

...

other arguments to be passed to geom_histogram.

Value

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

Examples

1
2
3
4
5
 data("Aids2", package = "MASS")
 gghistplot = plotHist(Aids2, target = "sex", col = "age")
 gghistAllplot.sex = plotHist(Aids2, target = "sex", col = NULL)
 gghistAllplot2.status = plotHist(Aids2, target = "status")
 gghistAllplot2.T.cat = plotHist(Aids2, target = "T.categ")

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