Part of rankall.R