This section will be for general comments about using R for ecological modeling, and some points about the software (the emdbook and bbmle packages) I've written to support the book.
- Due to some mildly obscure licensing issues, the adapt package is no longer available from CRAN (see my query in the R-devel archives to this effect). This is not a critically important package: it is used a little bit in chapters 1 and 6. Some possible options are:
- Mark Connolly points out that you may need to run yum install R-devel.x86_64 in order to install some of the additional packages required by emdbook
There are plenty of other places to look for R help as well (links to be added)
- R help list
- R ecology/environmetrics task view
- R-sig-eco mailing list
- R wiki
- other blogs etc.?
spluque comments: I am reading through the book, which I'm finding very helpful as an ecologist. However, one of the things that turns me off is the use of the equal sign for assignments. I realize this is a matter of personal style, and both the equal sign and "<-" are accepted following syntax rules. However, as has been sporadically discussed in R-help and ESS-help, the latter is a clearer and unambiguous choice. My eyes have been trained to read the "=" as an operator to set argument values. If I remember well, some of the ESS and R Core Team members have tried to discourage the use of "=" for assignments for that and other reasons. The difficulty reading code in this style is exacerbated by the mixture of both "=" and "<-" in the book. I personally found this very hard to read, which is unfortunate because it contrasts with the text between example codes.
BMB responds: fair enough. My rationale for this coding style is that newcomers to R (my target audience) have an awful lot to absorb, and that using the intuitive "=" for assignment is one less conceptual hurdle to overcome right at the beginning. I really could go either way; the counterarguments of setting good habits early on, and "what's one more thing to absorb when you're absorbing so much anyway?", are quite reasonable. (There are also the occasional tricky cases where "<-" works and "=" doesn't — for example
system.time(a <- det(matrix(runif(10000),nrow=100)))
but these are not usually examples I would recommend to beginners …) I tried (but guessing from your comments I failed) to make the book completely consistent in using "=" throughout … could you tell me where I slipped up?
spluque responds: I went back through it to check where the inconsistencies occurred, and I can no longer find them (embarrasingly enough!). I may have gotten somewhat confused by the "=" for assignments and the ">" for the prompt, which is always very close by to the left of it. At any rate, I strongly agree with the arguments in favor of "<-" for assignments. As you mentioned, setting good habits early on helps in saving problems down the road for beginners, and it's only a very minor hurdle even by itself, let alone compared to the difficulty of the subject matter IMHO. It's true that "=" may be easier to understand for some people, judging from the profusion of messages using this style in R-help, but I'd bet they'll regret using it once they understand the real meaning of assignments.