Miscellaneous R tools