I replied to your stack overflow question, but here's my solution in JavaScript. Maybe it could be useful to you and others if port it over to R. https://github.com/rayvoelker/js-loc-callnumbers/blob/master/locCallClass.js I'm happy to answer any questions about it, but I found that the method I used was pretty effective to sort all the call numbers I could throw at it! --Ray On Fri, Jul 21, 2017 at 11:56 AM, Cooper, Krystal <[log in to unmask]> wrote: > Hi Bill, > > Elizabeth Wickes from the uiuc iSchool suggested this. > > https://github.com/libraryhackers/library-callnumber-lc/tree/master/python > > Sent from my iPhone > > On Jul 21, 2017, at 9:43 AM, William Denton <[log in to unmask]<mailto:wtd@ > POBOX.COM>> wrote: > > Sorting by LCC numbers has been solved in most popular languages, but I > couldn't find any example of how to do it in R, nor could I figure it out, > so in case anyone is interested or can help, here's where I asked about it > on Stack Overflow: > > How to sort by Library of Congress Classification (LCC) number in R > https://stackoverflow.com/q/45240337/854346 > > Bill > -- > William Denton :: Toronto, Canada --- Listening to Art: > https://listeningtoart.org/ > https://www.miskatonic.org/ --- GHG.EARTH: http://ghg.earth/ > Caveat lector. --- STAPLR: http://staplr.org/ > -- Ray Voelker (937) 620-1830