Sort a matrix by more than one column

User ForumSort a matrix by more than one column
gwagner asked 3 years ago

Is there a way to sort a matrix by more than one column? I have a matrix of panel data and I would like to first sort it by year, then by cross-section. There are columns with unique year and cross section identifiers in the data matrix. Any suggestions?

1 Answers
gwagner answered 3 years ago

It looks like I ran to the forum too quickly. "sortmc" appears to do the trick.