The following topics are selected from "Chapter 22" of S-Plus 2000 Programmer's Guide (or my mirror here). Some of them are very useful to improve your code to make it short and more efficient.
- Use Vectorized Arithmetic
- Avoid for Loops
- Avoid Growing Data Sets
- Avoid Looping Over Named Objects
- Keep It Simple!
- Reuse Computations
- Reuse Code
- Avoid Recursion