Debug mode in R sometimes throws out the following error:
Error in fBody[[i]] : no such index at level 4
What causes this? And how to avoid it?
This is a bug in RStudio. I frequently get it while writing my R code. This is all I always do and work:
The bug has something to do with position of the breakpoints. For some reason, RStudio is confused the new breakpoints with something else. By cutting and pasting the source code, we are forcing RStudio to "forget" the old breakpoints and start refresh. It's like giving a new file to RStudio.
Now, you can run a debug session again.
RStudio developers, please fix this stupid bug.
On mac, I usually use:
It helps even without restarting RStudio
Usually works for me...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With