From 14edeb657cdb307b97e0c8f2d27c67af7e41c322 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 31 Jan 2024 22:15:00 +0100 Subject: [PATCH] styler --- R/plot.n_factors.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/plot.n_factors.R b/R/plot.n_factors.R index a58af6888..33ef1bff5 100644 --- a/R/plot.n_factors.R +++ b/R/plot.n_factors.R @@ -27,7 +27,7 @@ data_plot.n_factors <- function(x, data = NULL, type = "bar", ...) { # Add Variance explained if ("Variance_Explained" %in% names(attributes(x))) { - dataplot$Variance_Cumulative <- NULL # Remove column and re add + dataplot$Variance_Cumulative <- NULL # Remove column and re add dataplot <- merge( dataplot, attributes(x)$Variance_Explained[, c("n_Factors", "Variance_Cumulative")], @@ -69,7 +69,7 @@ data_plot.n_factors <- function(x, data = NULL, type = "bar", ...) { } # Title - attr(dataplot, "info")$title <- paste("How many", lab, "to retain") + attr(dataplot, "info")$title <- paste("How many", lab, "to retain") attr(dataplot, "info")$subtitle <- paste0("Number of ", lab, " considered optimal by various algorithm") if ("Variance_Cumulative" %in% names(dataplot) && type != "line") { attr(dataplot, "info")$subtitle <- paste0( @@ -111,7 +111,7 @@ data_plot.n_clusters <- data_plot.n_factors #' result <- n_factors(mtcars, type = "PCA") #' result #' -#' plot(result) # type = "bar" by default +#' plot(result) # type = "bar" by default #' plot(result, type = "line") #' plot(result, type = "area") #'