My list looks something like this:

I have converted the string values (such as rs267) to numbers but when I try:
lapply(list, function(x) sort(x))
My data ends up being sorted by the values of the list. But I want it to be sorted by the name values, since these are numeric.