2014-01-19 125 views

回答

5
a <- list(name = "Ann", age = 9) 
b <- list(name = "Bobby", age = 17) 
c <- list(name = "Alex", age = 6) 

L <- list(a,b,c) 
ages <- sapply(L,"[[","age") 
names <- sapply(L,"[[","name") 
names[order(ages)] 
+0

當然啦!謝謝,本。 –