Assorted R scripts