Some useful R scripts I have written