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
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,
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.
>
>
Hello R users.
This is a fairly basic question:
I am concatenating data from sets of files in a directory using a loop. The
column names in all files are exactly the same. My understanding is that rbind
takes column names from the first file it reads. However, my output is showing
that the co
4 matches
Mail list logo