Ok, the mistake was in the pca(x)<-princomp(SampleD[i,j]), should've used pca(x)<-princomp(SampleD) instead. Now, is there anyway to keep track of the matrix index, so in the end of all PCAs, I can tell which score/loading belongs to which sample? Thanks everyone!
On Mon, Jun 30, 2008 at 9:08 PM, Tanya Yatsunenko <[EMAIL PROTECTED]> wrote: > Hi all, > > I am doing bootstrap on a distance matrix, in which samples have been drawn > with replacement. After that I do PCA on a resulted matrix, and these 2 > steps are repeated 1000 times. > > pca(x) is a vector where I wanted to store all 1000 PCAs; and x is from 1 > to 1000 > SampleD is a new matrix after resampling; > > I am getting the following error message, which I don't understand: > .... > +pca(x)<-princomp(SampleD[i,j]) > + } > Error in eigen(cv, symmetric = TRUE) : infinite or missing values in 'x' > > Should I maybe not use a vector, but matrix instead? > Thanks! > > -- > Tanya. > > -- Tanya [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.