Hello,

I am using betadiver (vegan) to calculate beta diversity.
However, an error message shows

Error in ifelse(x > 0, 1, 0) :
  (list) object cannot be coerced to type 'double'


R version: 3.0.0

Please kindly advise how to solve the issue.
Also, please kindly tell if any more information is in need.
Thank you.

Elaine


code
# Non-Passerine table
dataNP_1 <-read.dbf("H:/temp_D/stage_4_R_2748/NP_1-10.dbf", as.is = FALSE)
dataNP_2 <-read.dbf("H:/temp_D/stage_4_R_2748/NP_11-19.dbf", as.is = FALSE)
dataNP<-merge(dataNP_1,dataNP_2,by=c("GID"),all=T)

.. skip...

# Non-Passerine and Passerine table (2748 species)
dataR<-merge(dataP,dataNP,by=c("GID"),all=T)
dim(dataR)
str(dataR)

library(vegan)

  ##  Raw  data
  R  <-  betadiver(dataR)

  ##  The  indices
  betadiver(help=TRUE)

  ##  The  beta sim  index (Lennon 2001)
  d  <-  betadiver(R,  "sim")

        [[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.

Reply via email to