Hi everybody I am trying to solve a problem in R. I want to read a lot of files allocated in multiples sub folders in a main folder. Then I used list.files() t
list.files()
There are a few ways to do this. Here's another one:
b <- c("A1","A10","A11","A12","A13","A14","A15","A2","A3","A4","A5","A6","A7") b[order(nchar(b), b)] # [1] "A1" "A2" "A3" "A4" "A5" "A6" "A7" "A10" "A11" "A12" "A13" "A14" "A15"