Learn R Programming

see (version 0.5.2)

plot.see_n_factors: Plot method for numbers of clusters to extract or factors to retain

Description

The plot() method for the parameters::n_factors() and parameters::n_clusters()

Usage

# S3 method for see_n_factors
plot(x, data = NULL, type = c("bar", "line", "area"), size = 1, ...)

Arguments

x

An object.

data

The original data used to create this object. Can be a statistical model or such.

type

Character vector, indicating the type of plot.

size

Size of geoms. Depends on the context of the plot() function, so this argument may change size of points, lines or bars.

...

Arguments passed to or from other methods.

Value

A ggplot2-object.

Examples

Run this code
# NOT RUN {
if (require("parameters") && require("nFactors")) {
  data(mtcars)
  result <- n_factors(mtcars, type = "PCA")
  result
  plot(result, type = "line")
}
# }

Run the code above in your browser using DataLab