SymbolixAU / googleway

R Package for accessing and plotting Google Maps
http://symbolixau.github.io/googleway/
Other
232 stars 46 forks source link

Sort data frames by numerical value to be able to join them with rbind #260

Closed dsanchezq closed 1 year ago

dsanchezq commented 1 year ago

Hi,

I have to join 60 dataframes named coord1, coord2, coord3, ... , coord60.

To do this I do the following:

new_df <- do.call("rbind",mget(ls(pattern(pattern = "^coord"))))

the problem is that it joins me the data frames but instead of doing it by the logical order of the numbers from 1 to 60 it does it in the following order:

coord1, coord10, coord11, coord12..., coord19, coord2,coord20,....

how could I solve this and have it order them coord1, coord2, coord3,.... coord60?

Thank you very much

dcooley commented 1 year ago

I don't think this question is releated to {googleway}, so probably belongs on a site like StackOverflow