Re: [R] column names with rbind loop

2011-08-30 Thread David Winsemius
erstand why you didn't use, ... header =TRUE, for both read operations. -- David. From: Weidong Gu [anopheles...@gmail.com] Sent: Tuesday, August 30, 2011 12:00 PM To: Vining, Kelly Cc: r-help@r-project.org Subject: Re: [R] column names with rbind

Re: [R] column names with rbind loop

2011-08-30 Thread Vining, Kelly
oject.org Subject: Re: [R] column names with rbind loop How about to add a conditional statement to get the header from 1st file for(i in all.files) { if (i==all.files[1]) new.data <- read.table(i,header=TRUE) else { new.data <- rbind(new.data, read.table(i))}} Weidong Gu On Tue, Aug 30,

Re: [R] column names with rbind loop

2011-08-30 Thread Weidong Gu
How about to add a conditional statement to get the header from 1st file for(i in all.files) { if (i==all.files[1]) new.data <- read.table(i,header=TRUE) else { new.data <- rbind(new.data, read.table(i))}} Weidong Gu On Tue, Aug 30, 2011 at 1:42 PM, Vining, Kelly wrote: > Hello R  users. > >