[R] files
Sarah Goslee
sarah.goslee at gmail.com
Wed Nov 30 03:28:52 CET 2016
Something like this:
filelist <- list.files(pattern="^test")
myfiles <- lapply(filelist, read.csv)
myfiles <- do.call(rbind, myfiles)
On Tue, Nov 29, 2016 at 9:11 PM, Val <valkremk at gmail.com> wrote:
> Hi all,
>
> In one folder I have several files and I want
> combine/concatenate(rbind) based on some condition .
> Here is the sample of the files in one folder
> test.csv
> test123.csv
> test456.csv
> Adat.csv
> Adat123.csv
> Adat456.csv
>
> I want to create 2 files as follows
>
> test_all = rbind(test.csv, test123.csv,test456.csv)
> Adat_al l= rbind(Adat.csv, Adat123.csv,Adat456.csv)
>
> The actual number of of files are many and is there an efficient way
> of doing it?
>
> Thank you
>
--
Sarah Goslee
http://www.functionaldiversity.org
More information about the R-help
mailing list