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
and when we're running RStudio and the RStudio Environment pane is not set to "Manual Refresh Only", because then RStudio calls str(x) in the background, which causes the iterator to be forwarded as if:
The tracker could warn, or even produce an error, saying that iter objects are not compatible with RStudio unless "Manual Refresh Only" is checked in the Environment pane.
Hi Henrik, thanks for your attention to this issue. Would it be possible to correct this issue by changing the behavior of the str built-in function? This is the recommendation in the SO post I shared in my issue. Whether one is working with an iterator in RStudio or in another env, as a user I would not expect str to advance the iterator. The purpose of str in the docs is to "Compactly Display the Structure of an Arbitrary R Object", and I would expect this to be possible without side effects.
Yes, that sounds like a workaround, but best is to update the iterators package. I can also imagine that Posit/RStudio could keep a list of object classes that should be excluded from auto-str() calling.
PS. Note that I am not affiliated with the iterators package, so I cannot make any updates to that.
Idea
Add a tracker that detects when an
iter
object is being added to the global environment:and when we're running RStudio and the RStudio Environment pane is not set to "Manual Refresh Only", because then RStudio calls
str(x)
in the background, which causes the iterator to be forwarded as if:The tracker could warn, or even produce an error, saying that
iter
objects are not compatible with RStudio unless "Manual Refresh Only" is checked in the Environment pane.See also
"iter"
objects bound in global environment in RStudio RevolutionAnalytics/iterators#3The text was updated successfully, but these errors were encountered: