Doing some computation and I've noticed that for further manipulation I'd need to preserve dataframe in a prior state. So, I have a bunch of dplyr steps and in the middle of pipe chain I would like to preserve data frame state into other object
is this possible?
df <- read.csv(file) %>%
mutate(....) %>%
mutate(....) %>%
# save df state to new df2 object here.......*****
group_by(....) %>%
arrange(var) %>%
summary()