updated rankall.R except for NA cases
updated rankall.R all cases pass