Re: [R] importing multiple text files in R

2014-04-01 Thread Kenn Konstabel
you can extract numbers from your file names and then sort them like this: filelist = list.files(pattern = ".s*.txt") filelist[order(as.integer(gsub("[^0-9]", "", filelist)))] (cf with alphabetic order: filelist[order(gsub("[^0-9]", "", filelist))] Or if you just have s1...s120 you can construct

Re: [R] importing multiple text files in R

2014-04-01 Thread Frede Aakmann Tøgersen
Try mixedsort in gtools package Br. Frede Sendt fra Samsung mobil Oprindelig meddelelse Fra: eliza botto Dato:01/04/2014 18.10 (GMT+01:00) Til: r-help@r-project.org Emne: [R] importing multiple text files in R Dear useRs, I have a number of text file located at a certain lo