One clarification: I did the dirty and completely unprofessional thing, and assumed that this function would only be run in the workspace with all your data. I use functions like this frequently for something I need to do multiple times for a particular project, but will never do anywhere else, but it isn't proper programming, and will fail if it can't find diffs and the other items referenced.
If you need this to be portable, you will need to pass them all as arguments to the function. Sarah -- Sarah Goslee http://www.functionaldiversity.org ______________________________________________ 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.