TL;DR: require breaks one of the fundamental rules of robust software systems, fail early. In a nutshell, this is because, when using require, your code might yield different, erroneous results, without signalling an error. This is rare but not hypothetical! Consider this code, which yields different results depending on whether {dplyr} can be loaded:
On the other hand, require
does install the package if hasn’t been installed (whereas library
doesn’t).
Original answer: Stack Overflow - What is the difference between require() and library().
Source: https://stackoverflow.com/a/51263513