get_transform {dlookr}R Documentation

Transform a numeric vector

Description

The get_transform() gets transformation of numeric variable.

Usage

get_transform(
  x,
  method = c("log", "sqrt", "log+1", "log+a", "1/x", "x^2", "x^3", "Box-Cox",
    "Yeo-Johnson")
)

Arguments

x

numeric. numeric for transform

method

character. transformation method of numeric variable

Details

The supported transformation method is follow.:

Value

numeric. transformed numeric vector.

See Also

plot_normality.

Examples

# log+a transform 
get_transform(iris$Sepal.Length, "log+a")

if (requireNamespace("forecast", quietly = TRUE)) {
  # Box-Cox transform 
  get_transform(iris$Sepal.Length, "Box-Cox")

  # Yeo-Johnson transform 
  get_transform(iris$Sepal.Length, "Yeo-Johnson")
} else {
  cat("If you want to use this feature, you need to install the forecast package.\n")
}


[Package dlookr version 0.6.3 Index]