Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
DominiqueMakowski committed Jan 10, 2018
1 parent b57ca21 commit 900c643
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vignettes/overview.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ plot(results)
The `n_factors()` function is useful in before running principal component (PCA) or factor (FA) analysis. As many statistical methods exists to that purpose, this function gathers them together and gives an overview on the most frequent result. It also draw a nice plot with the eigenvalues and the proportion of explained variance.


```{r echo=T, message=FALSE, warning=FALSE, results='hide'}
```{r echo=TRUE, message=FALSE, warning=FALSE, results='hide'}
results <- attitude %>%
select_if(is.numeric) %>%
psycho::n_factors()
Expand Down

1 comment on commit 900c643

@lintr-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R/analyze.stanreg.R:143:1: style: lines should not be more than 80 characters.

​      warning("Interpreting effect size following Cohen (1977, 1988)... Make sure your variables were normalized!")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/analyze.stanreg.R:292:1: style: lines should not be more than 80 characters.

​  names(summary) <- c("Variable", "MPE", "Median", "MAD", "Mean", "SD", paste0(CI, "_CI_lower"), paste0(CI, "_CI_higher"))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/correlation.R:59:1: style: lines should not be more than 80 characters.

corr <- psych::corr.test(df, y = df2, use = "pairwise", method = method, adjust = "none")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/correlation.R:92:3: warning: local variable ‘n’ assigned but may not be used

n <- nrow(df)
  ^

R/correlation.R:97:1: style: lines should not be more than 80 characters.

p[lower.tri(p)] <- p.adjust(p[lower.tri(p)], method = adjust, n = choose(nrow(p), 2))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/correlation.R:98:1: style: lines should not be more than 80 characters.

p[upper.tri(p)] <- p.adjust(p[upper.tri(p)], method = adjust, n = choose(nrow(p), 2))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/correlation.R:133:1: style: lines should not be more than 80 characters.

table <- cbind(table[1:length(table) - 1]) # remove last column and return the matrix (which is now a data frame)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/correlation.R:154:1: style: lines should not be more than 80 characters.

corr <- psych::corr.test(cbind(df, df2), use = "pairwise", method = method, adjust = "none")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/correlation.R:157:1: style: lines should not be more than 80 characters.

p[lower.tri(p)] <- p.adjust(p[lower.tri(p)], method = adjust, n = choose(nrow(p), 2))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/correlation.R:158:1: style: lines should not be more than 80 characters.

p[upper.tri(p)] <- p.adjust(p[upper.tri(p)], method = adjust, n = choose(nrow(p), 2))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/correlation.R:159:1: style: lines should not be more than 80 characters.

​    warning("Due to the presence of two dataframes, the plot might be incorrect. Consider with caution.")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/correlation.R:165:1: style: lines should not be more than 80 characters.

title = paste("A ", type, "'s correlation matrix (correction: ", adjust, ")\n", sep = ""),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/correlation.R:179:1: style: lines should not be more than 80 characters.

title = paste("A ", type, "'s correlation matrix (correction: ", adjust, ")\n", sep = ""),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/formatting.R:26:60: style: Put spaces around all infix operators.

formatted <- paste0(formatted, strrep("0", digits-1))
                                                          ~^~

R/n_factors.R:124:1: style: lines should not be more than 80 characters.

opt <- stats[stats$map == min, ]$n_factors[!is.na(stats[stats$map == min, ]$n_factors)]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/n_factors.R:136:1: style: lines should not be more than 80 characters.

opt <- stats[stats$BIC == min, ]$n_factors[!is.na(stats[stats$BIC == min, ]$n_factors)]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/n_factors.R:148:1: style: lines should not be more than 80 characters.

opt <- stats[stats$SABIC == min, ]$n_factors[!is.na(stats[stats$SABIC == min, ]$n_factors)]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/n_factors.R:167:1: style: lines should not be more than 80 characters.

n_optimal = c(na.omit(cfit[cfit$cfit == max(cfit$cfit, na.rm = T), ])$n_factors)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/n_factors.R:205:1: style: lines should not be more than 80 characters.

plot_data$n.Methods.Ratio <- plot_data$n.Methods.Ratio * (1 / max(plot_data$n.Methods.Ratio))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/n_factors.R:206:1: style: lines should not be more than 80 characters.

plot_data$area <- plot_data$n.Methods.Ratio / (max(plot_data$n.Methods.Ratio) / max(plot_data$Eigenvalues))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/n_factors.R:207:1: style: lines should not be more than 80 characters.

plot_data$var <- plot_data$Cum.Variance / (max(plot_data$Cum.Variance) / max(plot_data$Eigenvalues))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/n_factors.R:227:1: style: lines should not be more than 80 characters.

trans = ~. * (max(eigenvalues$Cum.Variance) / max(eigenvalues$Eigenvalues)),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test-normalize.R:13:42: style: Put spaces around all infix operators.

Participant = as.factor(rep(1:50,each=2)),
                                        ~^~

tests/testthat/test-normalize.R:19:30: style: Put spaces around all infix operators.

dfZ <- normalize(df, except="V3")
                            ~^~

tests/testthat/test-normalize.R:21:30: style: Put spaces around all infix operators.

dfZ <- normalize(df, except=c("V1", "V2"))
                            ~^~

Please sign in to comment.