I recently started using the PCAtools package and was wondering if it ploatloadings command also somehow allows the plotting of individual PCs.
I would be interested in plotting just the loading of PC1.
Overall, the packge works fine and I can modify the number of PCs plotted easily:
plotloadings(p, components = getComponents(pca_object, c(1,2)))
p: a pcaobject created as instructed in the plotloadings help section.
however any attempt to reduce the amount of components plotted below 2 results in the following error:
plotloadings(p, components = getComponents(pca_object, 1)
Error in x[, i] : incorrect number of dimensions
Does anyone know a way to work around this? Or can recommend another package I could use?
Thanks a lot!