PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, November 15, 2022

[FIXED] How to make R by default not stopping when an error is encountered while running a code?

 November 15, 2022     error-handling, r, rstudio     No comments   

Issue

I don't know if it has to do with a new version of RStudio or what, but before when I ran a code and an error was encountered R did not stop at the error and it kept running all the selected code or text. However, now whenever an error is encountered R stops. For instance, when I run this code,

Example error
plot(cars)

I only get this result:

> Example sentence
Error: unexpected symbol in "Example sentence"

I'd like R to run all the code, whether there are errors or not, by default. How can I do that?


Solution

You're absolutely correct about this being related to a new version of RStudio; this behavior changed in a recent release (2022.07) because -- most of the time -- if your code encounters an error there's no point in running the remainder of it, plus you want to stop and look at the error.

We're considering making this behavior optional since a lot of people prefer the old behavior. Please comment/upvote this feature request:

https://github.com/rstudio/rstudio/issues/10391



Answered By - Jonathan
Answer Checked By - David Marino (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing