lazy.plot: Lazy ggplot plotting

Description Usage Arguments Value Author(s) Examples

View source: R/lazy_plot.R

Description

Quickly produces specifc plots using the ggplot library. This function is exported but its main purpose is to be used in the eda function.

Usage

1
2
lazy.plot(data, x = NULL, y = NULL, type = "histogram",
  transparency = 1, theme = 1)

Arguments

data

[required | data.frame] Dataset containing predictor and / or target features.

x

[optional | character | default=NULL] A vector of feature names present in the dataset used to predict the target feature. If NULL then all columns in the dataset is used.

y

[required | character | default=NULL] The name of the target feature contained in the dataset.

type

[optional | character | default="histogram"] The type of plot to be produced. For numeric feature types histogram, density, boxplot and violin are available. For categorical bar and stackedbar are available.

transparency

[optional | numeric | default = 1] Transparency applied to plots.

theme

[optional | numeric | default=1] Color theme applied to plot, options range from 1 to 4.

Value

Plot of ggplot2 type

Author(s)

Xander Horn

Examples

1
2
lazy.plot(iris, x = "Sepal.Length", y = "Species", type = "density")
lazy.plot(iris, x = "Sepal.Length", y = "Species", type = "violin")

XanderHorn/lazy documentation built on Jan. 16, 2021, 6:15 p.m.