Skip to content
Prev 4328 / 7420 Next

BiodiversityR CAPdiscrim error

Hi Kendra, (sorry I got your name wrong, missed the comma.)
[cc'ing the list: better to keep stuff there, so others could comment.]

Ah, that's the trouble: your matrix is a matrix, not a dist object.
Assuming you do know which distance metric is applied, and you chose the
right one, you could simply use:

MD.2.tyc <- as.dist(MD.2.tyc)

# As you did not provide the environmental data: random factors.

 MD.2.env <- as.data.frame(c(rep("a", 10), rep("b", 3), rep("c", 21) ))
 names(MD.2.env) <- "z.om"

# And there you go:

 CAPdiscrim(MD.2.tyc~z.om, data=MD.2.env, axes=2, m=0)

HTH.

Regards,
 arne
On 19.02.2014 19:30, Mitchell, Kendra wrote: