[R] NAs introduced by coercion in dist()

slomascolo slomascolo at zoo.ufl.edu
Wed May 2 15:48:06 CEST 2007


I work with Windows and use R version 2.4.1. I am JUST starting to learn this
program...

I get this warning message 'NAs introduced by coercion' while trying to
build a distance matrix (to be analyzed with NMDS later) from a 336 x 100
data matrix.  The original matrix has lots of zeros and no missing values,
but I don't think this should matter.

I searched this forum and people have suggested that the warning should be
ignored but when I try to print the distance matrix I only get the row
numbers (the matrix seems to be 'empty') and I'm not being able to judge
whether the matrix worked or not.

To get the distance matrix I wrote:
dist.PxMx <- dist (PeaksMatrix, method='euclidean', diag=FALSE, upper=FALSE)

I tried including the p argument (included in the help for dist()) and
leaving it out, but that didn't seem to change anything.  I think that's
required for one distance measure though, not for euclidean dist. 

Should I really ignore this warning? If so, why am I not being able to see
the distance matrix?
-- 
View this message in context: http://www.nabble.com/NAs-introduced-by-coercion-in-dist%28%29-tf3680727.html#a10286358
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list