Linear models for diallel crosses: a review with R functions