I understand how to sort a vector, but I could not find how to sort a data frame or matrix by one variable (column). Could you give me some examples? Thanks! Ling