I'm having trouble with the ordisurf function in the vegan package. I have created an ordination plot (cmdscale) of 60 samples based on Bray-Curtis dissimilarities, and would like to overlay various soil edaphic characteristics as possible clues to the clustering I observe in my plot. However, I find that ordisurf creates a surface on the plot that is a perfect, even gradient - and doesn't match my data. An example of this output is attached (as .ps file), while these are the data for the environmental variable of interest:
> edaphic$K [1] 28 61 48 29 28 26 45 28 34 33 55 62 44 51 60 68 51 31 54 32 58 50 37 35 35 34 52 29 53 24 37 50 62 51 [35] 28 39 47 41 49 83 33 50 55 71 59 50 57 47 46 49 43 30 56 23 49 35 31 27 38 52 The contour lines suggest that there are only two values below 32, when in fact there are 11. Any ideas? Thanks! >>> > bc <- read.table("braycurtis_noheader.dist",header=F) > sample.mds <- cmdscale(bc) > edaphic <- read.table("edaphic.txt", header=T) > library(vegan) This is vegan 1.17-2 > ordisurf(sample.mds, edaphic$K, xlab="PC 1", ylab="PC 2", main="K") Loading required package: mgcv This is mgcv 1.6-1. For overview type `help("mgcv-package")'. Family: gaussian Link function: identity Formula: y ~ s(x1, x2, k = knots) Estimated degrees of freedom: 2 total = 3 GCV score: 140.9051 -- Matthew Bakker Ph.D. Candidate Department of Plant Pathology University of Minnesota 495 Borlaug Hall 1991 Upper Buford Circle Saint Paul, MN 55108 USA 612-624-2253 matt.g.bak...@gmail.com http://plpa.cfans.umn.edu/Matt_Bakker.html
ordisurf_output.ps
Description: PostScript document
______________________________________________ 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.