14 ene 2021

R exercises 3.1 (part 4)

 We have seen the score maps and the loading, but we can see both in the same plot?. That way we can relate the samples with the predictors weights. Well, this can be done with the biplot function with just a few lines of code once the PCs are calculated:

biplot(pcaObject, choices = 1:2, col =c("blue", "red"))

biplot(pcaObject, choices = 2:3, col =c("blue", "red")) 




No hay comentarios:

Publicar un comentario