df.sorted <- c(\"binned_walker1_1.grd\", \"binned_walker1_2.grd\", \"binned_walker1_3.grd\",
\"binned_walker1_4.grd\", \"binned_walker1_5.grd\", \"binned_walk
Isn't this simply the same thing you get with all lexicographic shorts (as e.g. ls
on directories) where walker10_foo sorts
higher than walker1_foo
?
The easiest way around, in my book, is to use a consistent number of digits, i.e. I would change to binned_walker01_1.grd
and so on inserting a 0 for the one-digit counts.