Calculating tolerance to barley leaf rust in R