Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Best Practices for Writing R Code/Additional recommendations #420

Afrah-Khairallah opened this issue Apr 22, 2019 · 2 comments


None yet
3 participants
Copy link

commented Apr 22, 2019

Lesson: Programming with R: 6. Best Practices for Writing R Code, under additional best practice recommendations.

Knowing how to debug/fix coding errors is a critical aspect for good practice.

The following points on "how to handle the coding errors" can be added for best practice.

  1. Track the types of errors that you're making to identify a common trend or misunderstanding.
  2. Track the coding errors and how it was fixed, it can save you time and effort in the future
  3. Factor your code into smaller pieces that it can be tested in isolation.
  4. Finally, be patient and try not to get demotivated from your coding errors :)

This comment has been minimized.

Copy link

commented Apr 23, 2019

Thanks for these ideas, @Afrah-Khairallah!

Reading that episode again now, I think it might be a good place to add links to recommended external resources. Do you know a good blog post, paper or book chapter that contains your 4 points and maybe explains them in some more detail?

I'd be happy to review a PR against _episodes_rmd/06-best-practices-R.Rmd, either as an inclusion in #421 or seperately.


This comment has been minimized.

Copy link

commented Apr 23, 2019

Hi Katrin, Thank you for your comment.

This blog is good

It explains the different types of errors (Fetal errors, warnings, and messages). It also explains Debugging techniques and tools that can be used for fixing errors e.g RStudio error inspector. I don't have resources for all the points combined! If i find more i will share it. I summarized these points from practice. I learned the most from errors and i thought it would be useful to add the error handling topic to the best practice section.

@ErinBecker ErinBecker added this to the June 2019 Release milestone May 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.