Workflow when creating a bunch of intermediate objects

Is there a way to create temporary objects(dataframes in this case) when your workflow involves a bunch of intermediate variables?

I'm summarising a lot of different small groups where all rely on different filter and case_when conditions, the outputs of which are 3x2 tibbles that I join with full_join. I could of course just assign all of them to random names, but I don't really need them after the join.

Thank you!

Have you considered creating a holder tibble and piping into it with add_row or bind_rows?

1 Like

If you are worried about the cumulation of the temporary objects; you can name them with the same specific prefix (such as tmp_) then delete all tmp_ containing objects with a following code at the end of the script.

rm(list = ls()[grepl("tmp_",ls())])


Thanks! I could always just remove them at the end, but the holder tibble is more in line with what I was looking for! :slight_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.