[Solved] Working for single input row but not for multiple
Here you go. I acknowledge you specified a loop in your question, but in R I avoid loops wherever possible. This is better. This uses plyr::join_all to join all your data frames by Item and LC, then dplyr::mutate to do the calculations. Note you can put multiple mutations in one mutate() function: library(plyr) library(dplyr) library(tidyr) … Read more