search for: eats_kg

Displaying 1 result from an estimated 1 matches for "eats_kg".

2012 Jun 28
3
loop through and modify multiple data frames
...I have a set of data frames that I want to do the same calculations on each. I've found out that I can put them in a list and loop through the list to do the calculation, but not put the results back into each data.frame.. For example three data frames cats, dogs, birds where >cats name eats_kg 1 bob 3 2 garfield 4 3 chuck 6 and dogs and birds are similar but not same length. On each data frame I now want to add a column with cost of food by calculating "eats_kg"*price of food. So question is, can I put all data frames into one loop which returns a new column for each? Ive t...