I ran into this issue and it's driving me crazy since I cannot properly work. When I execute a code in Rmarkdown it deletes all my objects in the environment, runs the first chunk of my code and return a message: object "whatever object I'm working on at the moment" not found. Did someone had a similar issue and could suggest some solutions? Thanks!
It's when running a chunk. Let's say I assigned some values to a tibble and then I run some filter functions on that tibble in some other chunk and boom it deletes the objects in the environment and says that it cannot find the object that I'm working with. So I need to go again to assign the values to the tibble etc. I have a feeling it might be Rmarkdown so I installed it again but nothing changed. I'll try to work on a script for a bit and see if it repeats there.