R/getEigenvaluesFromPCA.R

Defines functions getEigenvaluesFromPCA

Documented in getEigenvaluesFromPCA

getEigenvaluesFromPCA <-
function(x){
  if(class(x) == 'prcomp'){
    return(x$sdev^2)
  }
  else if(class(x) == 'princomp'){
    return(x$sdev^2)
  }
  else if(class(x) == 'pcaRes'){
    return(x@sDev^2)
  }
  else if(class(x) == 'acp'){
    return(x$explica)
  }
stop("Erro: No eigenvalues");
}
juscelino-izidoro/supcavs documentation built on Jan. 2, 2022, 7:49 a.m.