I\'ve found some weird behavior with apply.
apply
Assume I have an arbitrary matrix of ordered variables
set.seed(4) x <- ordered(sample(1:10,
I am not sure why the extract reason for that happen to apply function. But you could try sapply to solve the problem.
sapply
rankmat3 <- as.data.frame(sapply(data1, rank))
rankmat3 x y z 1 4.0 3 4 2 1.0 1 1 3 2.5 2 3 4 2.5 4 2