#1
label<-c("A","B","C","D","E","F")
dataX<-c(3.3, 3.4, 4.3, 4.4, 5.1, 2.0)
dataLX<-data.frame(label,dataX); dataLX
order(dataLX[,2])
dataF<-dataLX[order(dataLX[,2]),]; dataF
#2
dataY <- matrix(c(9,6,3,2,5,8,7,1,4),nrow=3,ncol=3); dataY
order(dataY[3,])
dataG<-dataY[,order(dataY[3,])]; dataG