Learn R Programming

dlookr (version 0.3.9)

plot.transform: Visualize Information for an "transform" Object

Description

Visualize two kinds of plot by attribute of `transform` class. The Transformation of a numerical variable is a density plot.

Usage

# S3 method for transform
plot(x, ...)

Arguments

x

an object of class "transform", usually, a result of a call to transform().

...

arguments to be passed to methods, such as graphical parameters (see par).

See Also

transform, summary.transform.

Examples

Run this code
# NOT RUN {
# Generate data for the example
carseats <- ISLR::Carseats
carseats[sample(seq(NROW(carseats)), 20), "Income"] <- NA
carseats[sample(seq(NROW(carseats)), 5), "Urban"] <- NA

# Standardization ------------------------------
advertising_minmax <- transform(carseats$Advertising, method = "minmax")
advertising_minmax
summary(advertising_minmax)
plot(advertising_minmax)

# Resolving Skewness  --------------------------
advertising_log <- transform(carseats$Advertising, method = "log")
advertising_log
summary(advertising_log)
plot(advertising_log)
# }

Run the code above in your browser using DataLab