[R] Principal Components Analysis
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu Dec 27 18:25:18 CET 2007
On Wed, 26 Dec 2007, SNN wrote:
>
> Hi,
>
> I do have a file that has 500000 columns and 40 rows. I want to apply PCA on
> that data and this is what I did
>
> h1<-read.table("Ccode.txt", sep='\t', header=F) # reads the data from the
> file Ccode.txt
> h2<-prcomp(na.omit(h1),center=T)
>
> but I am getting the following error
>
> "Error in svd(x, nu = 0) : 0 extent dimensions"
>
>
> I appreciate if someone can help
You probably have a missing value in every row. But does PCA with 500000
columns make sense: 4999961 of the PCs are constant and arbitrary?
It is possible you meant PC on the transpose (sometimes called Q-mode)
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list