When using this code WEHAsum = read.csv("/tmp/wehasum.csv", check.names = FALSE, as.is=TRUE) plotPCA(as.matrix(WEHAsum[,-1][,sort(colnames(WEHAsum[,-1]))]), x.coord=-20, y.coord=20) I get Error in (function (classes, fdef, mtable) : unable to find an inherited method for function 'plotPCA' for signature '"matrix"'