[R] CAPdiscrim error in BiodiversityR

Sparsons scottanthonyparsons at gmail.com
Thu Jul 7 05:27:17 CEST 2011


Hello,

I having trouble running the CAPdiscrim function located in biodiversityR.

My data tables are as follows:
community data frame (called "spdata")
           Species1...  Speciesn
site1..     
site2..
siten

with abundance data as values. Site names are row names.

and environmental data (called "envdata")
           year    elevation
site1...
site2...
siten

my command lines are as follows:
dists = vegdist(spdata, method ="bray")
capmodel = CAPdiscrim(dists ~ elevation, data =envdata, axes =4, m=0,
permutations = 999)

This returns the following error:

Error in eval(predvars, data, env) : 
  numeric 'envir' arg not of length one
In addition: Warning messages:
1: In cmdscale(distmatrix, k = nrow(x) - 1, eig = T, add = F) :
  some of the first 88 eigenvalues are < 0
2: In sqrt(ev) : NaNs produced

same error occurs when i run:
capmodel = CAPdiscrim(spdata ~ elevation, data =envdata, dist = "bray", axes
=4, m=0, permutations = 999)

I'm quite stumped as to what is going on here. What is envir? 

Any ideas anyone?
Thanks in advance,
Best Regards,
Scott Parsons PhD
James Cook University, Townsville, QLD, Australia
 

--
View this message in context: http://r.789695.n4.nabble.com/CAPdiscrim-error-in-BiodiversityR-tp3650568p3650568.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list