setwd("C://PerlProject") # loading data into R indata <- read.table ("result.csv", colClasses=c(NA,"NULL","NULL",NA,NA,NA,NA,NA,NA), header = TRUE, sep = ",") # load the stats package library(stats) mydata <- indata[,2:8] ir_pca <- prcomp(mydata, center = TRUE, scale. = TRUE) scrs <-ir_pca$x[, 1:2] pdf("plots.pdf", width=16, height=16) plot(scrs) text( scrs, rownames( indata ), pos= 3 ) dev.off()