Thank you Hadley. With your solution, now it feels very easy ! 

  _____  

From: h.wick...@gmail.com [mailto:h.wick...@gmail.com] On Behalf Of Hadley
Wickham
Sent: Monday, April 04, 2011 6:11 PM
To: Umesh Rosyara
Cc: Dennis Murphy; r-help@r-project.org; rosyar...@gmail.com
Subject: Re: [R] merging data list in to single data frame



> filelist = list.files(pattern = "K*cd.txt") # the file names are K1cd.txt
> .................to K200cd.txt

It's very easy:

names(filelist) <- basename(filelist)
data_list <- ldply(filelist, read.table, header=T, comment=";", fill=T)

Hadley


--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/


  _____  

No virus found in this message.
Checked by AVG - www.avg.com



        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to