Dear Ashley, I am one of the co-authors for these scripts. I just downloaded the example files from the ESA archives and ran in naively on some data and it worked fine. My guess is that the problem lies in a portion of the script that you did not provide. If I had to be more certain with my guess, I bet your 'y' data are the predicted values from a linear model instead of the raw data. Therefore, when the permutation procedure tries to shuffle residuals, there are no residuals to shuffle.
If this is not the case, please email me and I can look at the rest of your adapted script. My new email address is michael (dot) collyer (at) wku (dot) edu. By the way, one regret that we had after publishing these R scripts in the ESA archives was to not provide a link for updates. ESA is going to allow us to make an amendment. Look for this change in the near future. We are in the process of streamlining the original functions a bit and plan to make these updates available. Sincerely, Michael Collyer Western Kentucky University, Department of Biology -- View this message in context: http://r.789695.n4.nabble.com/Help-with-permutation-function-from-Turner-et-al-2010-Ecology-tp4632865p4632902.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.