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");
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.