R- use for loop run through multiple data.frames named with a pattern

时间:2016-07-11 20:40:34

标签: r for-loop dataframe paste

I want to use a for loop to perform the same function on multiple similarly named data.frames. Is there a way to do this? This is my current attempt:

for(i in colnames(SellList)){
  as.data.frame([i].sub) <- [[paste("SaleAmount")]] <- SellList[1,i]
}

where the data.frames being pasted to are named A.sub, B.sub, etc. and the column names are A, B, etc.

0 个答案:

没有答案