Skip to content

Commit

Permalink
please lintr
Browse files Browse the repository at this point in the history
  • Loading branch information
DominiqueMakowski committed Nov 30, 2023
1 parent 87a8680 commit 1c89a11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/n_factors.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Check warning on line 344 in R/n_factors.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=R/n_factors.R,line=344,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 147 characters.
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")


Expand Down

0 comments on commit 1c89a11

Please sign in to comment.