collection of R codes that i wrote for many things