Not sure if this is due to my limited knowledge of R or just plain impossible but here is my problem.
I have a dataset made of a bunch of chemical signatures for a number of samples. In order to find possible correlations, I ran a PCA and now I'd need to plot each sample (once projected onto each components) in function of its sample number instead of having a biplot with the two main components (yes I know it's weird, but I really need to do it this way).
I'll post a dummy dataset and the way I'm running the PCA
depth<-c(1:1000)
Na<-runif(1000, min=50, max=100)
K<-runif(1000, min=0, max=10)
Mg<-runif(1000, min=5, max=20)
Ca<-runif(1000, min=5, max=20)
Cl<-runif(1000, min=50, max=50)
NO3<-runif(1000, min=10, max=75)
SO4<-runif(1000, min=50, max=200)
data<-data.frame(depth, Na;K,Mg,Ca,Cl,NO3,SO4)
GV7.pca<-prcomp(data[,c(2:8)])
And now I'm stuck. I need to plot them and see for each sample, essentially, its "value" once projected onto each components and then see the variability in function of the depth of the sample: normally I would use ggbiplot(GV7.pca)
to obtain a quick graphical representation of my data, but that only considers the first two major components (and I'm interested in some less significant ones) and the number of data I have make so that it's almost impossible to see anything.
Any idea?