R/getScoresFromPCA.R

Defines functions getScoresFromPCA

Documented in getScoresFromPCA

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