Skip to content
bbminfo – Learn from Scratch
Subjects Code examples Library reference
Computer Programming Python Java C++ C Go PHP Kotlin Ruby R Scala Groovy

Tutorial menu

Subjects

Computer Programming MathsPlanned ChemistryPlanned

Lesson contents

Programming resources

All languages Code examples Library reference

Programming languages

Python Java C++ C Go PHP Kotlin Ruby R Scala Groovy
Tutorials/Computer Programming/R/Library/Errors and exceptions

R errors and exceptions

Handle invalid entries, missing records, and interrupted work. Follow each failure from the input that triggers it to a response the user can act on.

file.existsZero denominator guardtryCatch and stop

Browse by topic

  • Input and validation3
  • State and collections3
  • Files and streams2
  • Handling and diagnostics1

Input and validation

  • grepl and strtoiReject a mistyped order quantity
  • is.integerCheck the type of an imported fare
  • is.naPrint a label when the phone number is missing

State and collections

  • Checked list indexingFind a seat after the coach changes
  • Zero denominator guardSplit an equipment fee across a class
  • length before extractionCall the next person at the clinic

Files and streams

  • file.existsOpen the first receipt of the day
  • readBin and lengthRead a stock count from a short record

Handling and diagnostics

  • tryCatch and stopRecover from a failed validation in a batch

All R library sections

R tutorials

Environment setup› Library reference›
Advertisements
bbminfo – Learn from Scratch
© 2026 bbminfoArtwork creditsPrivacy policy