my question is two-fold..
- I have a list of dataframes, and using lapply in R, I would like to add a column to each dataframe in the list.
- The added column should actually take values sequentially from a list, if possible. I have a list that is the same length as the list of dataframes, and each value in that list should be the added column value.
The reason I'm doing this is because the file name of each data set I'm importing has date info, e.g. the file name contains Jun12_2003. So I want to import each data set, and then assign a column for year and date, taking the info from the file name (so far doing that part with regexp).
Thanks for any help!