Re: [R] Adding columns to csvs in a loop

2012-03-20 Thread Jim Holtman
for (i in fileList){ x <- read.csv(i) x$QID <- "" x$COMMENTS <- "" x$"DATE CREATED" <- "" write.csv(x, file = i) } Sent from my iPad On Mar 19, 2012, at 17:42, Edgar Alminar wrote: > Hello, > I am trying to add columns to a folder of csvs (the folder is called > "20120314"). > I hav

[R] Adding columns to csvs in a loop

2012-03-19 Thread Edgar Alminar
Hello, I am trying to add columns to a folder of csvs (the folder is called "20120314"). I have csvs of different numbers of columns, but at the end of this loop, I'd like to add three columns to each csv: "QID", "COMMENTS", "DATE CREATED". I've tried some things with cbind, I looked at using aw