Hi Irene, The forward.sel function in the package ade4 or adespatial is a good one to use! Here is a bit of code for you. ################################################## space.dbmem <- dbmem(dist(spatial), MEM.autocor = "positive") #calculate positive dbmem's or in your case pcnm's fwsel_spat <- forward.sel(species_matrix,space.dbmem) # forward select . need to install package mentioned above spat_exp <-space.dbmem[,fwsel_spat$order] # selects forward selected variables ##################################################
Good luck! let me know if you have any questions. -Steve On Thu, Jun 6, 2019 at 9:34 AM Irene Adamo <i.adam...@gmail.com> wrote: > Dear all, > > I am trying to run a variaion partitioning in using the varpart function in > vegan. I would like to include the geographic coordinates as explanatory > variables so I calculated the principle coordinates of neighbour matrices. > Now I would like to perform a selection of the significant spatial > eigenvectors but I don`t know how to do it in R. Could anybody help me? > > data(mite.xy) > pcnm1 <- pcnm(dist(mite.xy)) > > then I get the pcnm vectors and I would like to select only the > significant ones. > > Thanks a lot! > > [[alternative HTML version deleted]] > > _______________________________________________ > R-sig-ecology mailing list > R-sig-ecology@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-ecology > [[alternative HTML version deleted]] _______________________________________________ R-sig-ecology mailing list R-sig-ecology@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology