0

I have loaded labdsv package on R and I am trying to run indval following: https://www.youtube.com/watch?v=mExObdyuVbw

When I put iva <- indval(A.only, B$Location), based on my data names, I keep onb getting the error:

Error in indval.default(A.only, B$Location) : All species must occur in at least one plot

I have checked a couple of times that species without any data (that is all 0) have been removed in my table).

Any idea what is causing that error and how do I proceed to the the indicator values?

peterh
  • 11,875
  • 18
  • 85
  • 108
Ashley.H
  • 1
  • 1
  • 1
    Welcome! Please make this question reproducible. http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – shayaa Jul 28 '16 at 03:15
  • The title of your question is not enough descriptive on my opinion. – peterh Jul 30 '16 at 06:19

1 Answers1

1

I had a similar problem. I started by removing species (columns) with nothing there

mydata2 <- mydata[ , which(!apply(mydata==0,2,all))]

I still had the same error. The issue was that some species columns had NAs, so I changed these to zero.

mydata2[is.na(mydata2)] <- 0

It worked fine after that.

Regular Jo
  • 5,190
  • 3
  • 25
  • 47
AlanL
  • 21
  • 1
  • 6