https://github.com/cran/nFactors
Revision c9833e40e7af6531f93c92bb4d2ab8a87541faad authored by Gilles Raiche on 09 December 2009, 00:00:00 UTC, committed by Gabor Csardi on 09 December 2009, 00:00:00 UTC
1 parent b6fe861
Raw File
Tip revision: c9833e40e7af6531f93c92bb4d2ab8a87541faad authored by Gilles Raiche on 09 December 2009, 00:00:00 UTC
version 2.3
Tip revision: c9833e4
plotuScree.R
"plotuScree" <-
function(Eigenvalue, x=Eigenvalue, model  = "components",
         ylab   = "Eigenvalues",
         xlab   = "Components",
         main   = "Scree Plot" ,
         ...) {
 Eigenvalue  <- eigenComputes(x, ...)
 if (!inherits(Eigenvalue, "numeric")) stop("use only with \"numeric\" objects")
 if (model == "factors") xlab <- "Factors"
 par(mfrow = c(1,1))
 nk          <- length(Eigenvalue)
 Component   <- 1:nk
 plot.default(as.numeric(Component),
              as.numeric(Eigenvalue),
              type = 'b',col = "black", pch = 1,
              ylab = ylab,
              xlab = xlab,
              main = main
              ) 
 }

back to top