Below are a number of links that provide code and scripts for ecological data analysis from our own projects.
See our GitHub repository for the eEcoLiDAR project with scripts and information about processing LiDAR point cloud data
Spatial autocorrelation and regression modelling
See Appendix S1 and S3 of Kissling & Carl (2008) for R code and data to construct simultaneous autoregressive models in R
See the Appendix of Dormann et al. (2007) for R code and data to test different methods to account for spatial autocorrelation in the analysis of species distributional data