I can use Plot function. Could use plot to get the pca results. But not sure how to label these points according to my datapoints which are rownames(Sample) numbered 1 to 90
Sample<-read.table(file.choose(),header=F,sep="\t")
Sample.scaled<-data.frame(apply(Sample_2XY,2,scale))
Sample_scaled.2<-data.frame(t(na.omit(t(Sample_2XY.scaled))))
pca.Sample<-prcomp(Sample_2XY.scaled.2,retx=TRUE)
pdf("Sample_plot.pdf")
plot(pca.Sample$x)
dev.off()
Here is a simple way of doing it, with plotting the first two components:
By the way, you can use your regular device to see the plots on the go, and then copy the contents of that device to PDF: