[R] Error in colMeans ... what's wrong with my data?

Federico Calboli f.calboli at imperial.ac.uk
Fri Apr 1 22:26:12 CEST 2005


On Fri, 2005-04-01 at 20:27 +0200, Hartmut Weinrebe wrote:
> Having searched and searched I still haven't found what's the problem with my data (I've attached the relevant file).
> Every time I tried to use the CANCOR-Function I got error messages.
> So I turned to check my two sets of variables separately by using the "colMeans"-Function. With one set no problem .. but with the other.
> 
> My input :
> 
> > struktur <- read.delim("struktur.csv", header=TRUE, sep = ";")
> >colMeans(struktur)
> 
> And the resulting error:
> 
> Error in colMeans(x, n, prod(dn), na.rm) : 
>         `x' must be numeric
> 
Check what str(stuktur) gives you... looks like it seeing your numbers
as something else..

BTW, I do not to have the attached file, seems to have been dropped
before reaching my inbox, so that's all I can suggest.

F
-- 
Federico C. F. Calboli
Department of Epidemiology and Public Health
Imperial College, St Mary's Campus
Norfolk Place, London W2 1PG

Tel  +44 (0)20 7594 1602     Fax (+44) 020 7594 3193

f.calboli [.a.t] imperial.ac.uk
f.calboli [.a.t] gmail.com




More information about the R-help mailing list