ranking(c(3, 3, 2, NA, 5), direction="asc", ties="min", na.last="bottom")
ranking(c(3, 3, 2, 5), direction = "desc", dense = TRUE)
Gen=c("G1","G2","G3")
YN=c(10,8,5)
YS=c(7,5,3)
a=STI(Gen, YN, YS) # for instance STI taken here.
out=data.frame(a$Result$Gen, a$Result$STI,
ranking(a$Result$STI, direction="desc")
)
print(out)
Run the code above in your browser using DataLab