You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rm(list = ls()) on top of files correlates with objects being automatically deleted #1558
While working with VScode, I noticed that when working with specific files I keep loosing the objects in my global environment.
The patterns seems that those files start with a remove call (rm(list = ls())), that is before I create my objects.
I do not run source() or anything of the kind, so I am wondering what may actually run this line in the background.
I suspect, but have no proof, nor reprex, that languageserver may be the culprit but I failed to find anything on the topic.
Of course, that could also come from various other VScode extensions and I did not experiment to dissect the issue.
Activity
randy3k commentedon Sep 6, 2024
I moved it to VScode-R, languageserver only performs static analysis, and it doesn't alter your R runtime.
ThomasSoeiro commentedon Sep 23, 2026
@eitsupi @Fred-Wu @grantmcdermott Close as not reproducible? Or move to discussion?
@courtiol note that
rm(list = ls())is highly suggestive of a non-reproducible workflow