[R] Principal componet plot from lower triangular matrix file
mbnchakravarthy at gmail.com
Mon Nov 28 11:55:41 CET 2011
I have a comma separated file with element names in first column like shown
Original data is a 10000x10000 symmetric matrix (600 MB). To reduce file
size, I have minimized matrix to only lower triangle. Is there a (memory)
efficient way to 1) read file 2) compute first and second principal
components and 3) and plot first vs second PC's ?
In the past, I could do this by :
b <- read.csv("distance.csv", sep=",", head=F) # distance.csv file is
complete data matrix, so this command worked !!
my_matrix <- data.matrix(b)
pca2 <- princomp(my_matrix)
text(pca2$scores[,1],pca2$scores[,2],rownames(nba_matrix), cex=0.5, pos=1)
This time, I don't have a complete file. So, I was wondering, how to do this
Any help is much appreciated
View this message in context: http://r.789695.n4.nabble.com/Principal-componet-plot-from-lower-triangular-matrix-file-tp4114840p4114840.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help