Thanks. Interesting. It would be helpful for me to understand why this is bad practice and what would be a better practice. Appreciate if you could please explain.
Lets say i have a data.frame with a few columns, all of which are of mode double or factor (no vector elements so far). For every row of the data frame, i would like to make some calculations (same calculation for every row). I would like to break down these calculations into steps and i would like to get intermediate outputs between these steps (intermediate outputs are vectors). So i write a function for each step. I then apply() the function to the rows of the data frame and add a column to the data frame with the result of the function. This way i get to observe the intermediate outputs.
What would be a better design for what i want to achieve please?