useful daily functions for R