R-script devellopped in LOLA-BMS