Debugging

STAT1003 – Statistical Techniques

Dr. Emi Tanaka

Australian National University

These slides are best viewed on a modern browser like Google Chrome on a desktop or laptop. Some interactive components may require some time to fully load.

Basic troubleshooting

  • Whether you are good at programming or not, you will inevitably encounter errors.
  • If you encounter an error,

    1. Read the error message!
    2. Google the error message or ask generative AI (like chatGPT)
    3. Ask for help with a reproducible example

Reproducible Example with reprex LIVE DEMO

  • Copy your minimum reproducible example then run
reprex::reprex(venue = "html")
  • Once you run the above command, your clipboard contains the formatted code and output for you to paste into places like Canvas discussion board