Excellent advice on this is given in the classic Shiny Ball Book, Item 12 "Use foreach, map and grep as appropriate":
In reply to Re: difference between grep and map
by eyepopslikeamosquito
in thread difference between grep and map
by boom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |