Miscellaneous R scripts related to work for NatCap