Learn R Programming

see (version 0.10.0)

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, ...)

Value

A ggplot2-object.

Arguments

x

An object.

data

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

type

Character vector, indicating the type of plot. Options are three different shapes to illustrate the degree of consensus between dimensionality methods for each number of factors; "bar" (default) for a bar chart, "line" for a horizontal point and line chart, or "area" for an area chart (frequency polygon).

size

Depending on type, a numeric value specifying size of bars, lines, or segments.

...

Arguments passed to or from other methods.

Examples

Run this code
if (FALSE) { # require("nFactors")
data(mtcars)
result <- parameters::n_factors(mtcars, type = "PCA")
result

plot(result) # type = "bar" by default
plot(result, type = "line")
plot(result, type = "area")
}

Run the code above in your browser using DataLab