Cookbook: emulating R. Closes #81.