From 1c89a11dc9b057bbea644c82f792af792204692a Mon Sep 17 00:00:00 2001 From: Dominique Makowski Date: Thu, 30 Nov 2023 16:05:25 +0000 Subject: [PATCH] please lintr --- R/n_factors.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/n_factors.R b/R/n_factors.R index 5d14b3855..eaa210e39 100644 --- a/R/n_factors.R +++ b/R/n_factors.R @@ -341,10 +341,10 @@ n_factors <- function(x, ) # Add cumulative percentage of variance explained - fa <- factor_analysis(x, cor=cor, n = max(by_factors$n_Factors)) # Get it from our fa:: wrapper (TODO: that's probably not the most efficient) + fa <- factor_analysis(x, cor = cor, n = max(by_factors$n_Factors)) # Get it from our fa:: wrapper (TODO: that's probably not the most efficient) varex <- attributes(fa)$summary # Extract number of factors from EFA output (usually MR1, ML1, etc.) - varex$n_Factors <- as.numeric(gsub("[^\\d]+", "", varex$Component, perl=TRUE)) + varex$n_Factors <- as.numeric(gsub("[^\\d]+", "", varex$Component, perl = TRUE)) by_factors <- merge(by_factors, varex[, c("n_Factors", "Variance_Cumulative")], by = "n_Factors")