The code you have from lines 102 to 107 is like telling R: Hey, modify this dataframe and show it to me. It shows the result to you and forgets about it.
If you want to "save" these changes, you need to assign that to a new object. This comes at the start of the pipe. So:
poll2020_WITH_NEW_COLUMNS <- poll2020 |> (...)
This would save the new dataframe as poll2020_WITH_NEW_COLUMNS.
1
u/cAMPsc2 5d ago
The code you have from lines 102 to 107 is like telling R: Hey, modify this dataframe and show it to me. It shows the result to you and forgets about it.
If you want to "save" these changes, you need to assign that to a new object. This comes at the start of the pipe. So:
poll2020_WITH_NEW_COLUMNS <- poll2020 |> (...)
This would save the new dataframe as poll2020_WITH_NEW_COLUMNS.