hi,
How do i undo some codes that were run previously executed.
In general, you can't. That would mean keeping in memory all the previous versions of the data, which is impractical if working with big datasets.
So in practice, it's at the time you write your code that you have to be careful, for example you can do
my_data <- generate_data()
my_processed_data <- do_something(my_data)
that way, if you realize that do_something()
is wrong, you can come back to my_data
which hasn't been modified.
A good practice is to write all your operations in a script that you keep clean, so that from time to time you can restart the R session and rerun the script without worry.
This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.