[R] Adding columns to csvs in a loop

Edgar Alminar eaalminar at ucsd.edu
Mon Mar 19 22:42:51 CET 2012


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 awk, but I couldn't get either to work.

Does anyone have an example of a working loop that adds columns to a folder of csvs?

Thanks!
Edgar


More information about the R-help mailing list