Ok, thanks, that helps.

What about running the same code on a bit of a different set of data, ex.;
korma<- read.csv(text="
GR  T C M B
1 0 0 0 1
2 0 1 0 0
3 1 1 0 1
4 1 0 1 1
5 0 0 0 1
6 1 0 1 1...
",sep="",row.names=1,header=TRUE)

str(korma)
dist(korma)
korma.dist<- dist(korma)
 korma.mds <- isoMDS(korma.dist)
#Error in isoMDS(korma.dist) :   zero or negative distance between objects
1 and 5
# What do I need to do to my data to avoid the error message?




On Sun, Sep 1, 2013 at 3:03 AM, Berend Hasselman <bhh@xs4all.nl> wrote:

>
> On 01-09-2013, at 00:30, Simona Augyte <simona.augyte@uconn.edu> wrote:
>
> > I'm trying to run a very simple non-metric multidimensional scaling code
> on
> > a 8x5 character matrix.
> > gr T C M B
> > arcor 6 4 6 5
> > corfo 24 21 23 24
> > corma 25 15 26 17
> > crust 3 2 6 5
> > fil 15 12 15 15
> > fol 11 9 6 8
> > leat 10 11 13 13
> > seag 2 2 2 2
> >
> > My code is as follows;
> > coma<-read.csv("coma.csv",header=TRUE)
> > coma.x<-as.matrix(coma)
> > coma.dist <- dist(coma.x) # right here I get a warning message -> In
> > dist(coma.x) : NAs introduced by coercion
> >
> > WHAT DOES THAT MEAN??? the table has values and there are not NAs. Could
> > this be a by product of the way I inserted the data?
> >
>
> Yes.
> Your table contains characters and not numbers.
>
> Tell read.csv that the first column contains row names (assuming that that
> is indeed the case).
>
> coma<- read.csv(text="
> gr T C M B
> arcor 6 4 6 5
> corfo 24 21 23 24
> corma 25 15 26 17
> crust 3 2 6 5
> fil 15 12 15 15
> fol 11 9 6 8
> leat 10 11 13 13
> seag 2 2 2 2
> ",sep="",row.names=1,header=TRUE)
>
> coma
> str(coma)
> dist(coma)
>
> Berend
>
>
> > Please help.
> >
> > --
> >
> > Simona Augyte, MS
> > PhD student
> > Ecology and Evolutionary Biology
> > University of Connecticut
> > cell 707-832-7007
> >
> >       [[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.
>
>


-- 

Simona Augyte, MS
PhD student
Ecology and Evolutionary Biology
University of Connecticut
cell 707-832-7007

	[[alternative HTML version deleted]]

