Home > OS >  How to get a list of eigenvectors in R
How to get a list of eigenvectors in R

Time:10-19

When I do the below code on my data, since there are 35 variables the resulting plot is almost useless because of all the overlap. I can't seem to find anywhere that would give me the list of data that's used to make the plot. For instance, I have a factor called avg_sour that has a direction of about 272 degrees and a magnitude of 1. That's one of the few I can actually see. If I had this data in a table, however, I could see clearly what I'm looking for without having to zoom in and out every time. Add to that the fact that this is for a presentation, so I need to be able to make this visible quickly, without them looking at multiple things--but I think I could get away with a crowded graph and a table that explained the crowded portion. Seems like it ought to be simple, but...I'm afraid I haven't found it yet. Any ideas? I can use any package I can find.

ggbiplot(xD4PCA,obs.scale = .1, var.scale = 1, 
     varname.size = 3, labels.size=6, circle = T, alpha = 0, center = T) 
     scale_x_continuous(limits=c(-2,2))  
     scale_y_continuous(limits=c(-2,2))

enter image description here

CodePudding user response:

If your xD4PCA is from prcomp function, then $rotation gives you eigenvectors. See enter image description here

Edited one(select only first two variables)

enter image description here

  • Related