basic r functions that I use often