add R.apply
Merge pull request #465 from davidchambers/apply

add R.apply