R utility code for DR work