You are looking for rank()
...
rank( df$value )
# [1] 6 1 9 10 2 3 8 5 7 4
order()
gives the ordered indices of the vector you are ordering. So, if you do order( df$value )
you get [1] 2 5 6 10 8 1 9 7 3 4
because the 2nd value of df$value
should go first, the fifth value should be 2nd and so on. Ordinarily you use it to order a vector or data.frame
according to some atomic vector like so...
df[ order( df$value ) , ]
# site currency value
#2 C USD 0.1
#5 A CNY 0.2
#6 C CNY 0.3
#10 C USD 0.4
#8 C GBP 0.5
#1 B USD 0.6