What is require () in R?

Require: Installing and Loading R Packages for Reproducible Workflows. A single key function, ‘Require’ that wraps 'install. As with other functions in a reproducible workflow, this package emphasizes functions that return the same result whether it is the first or subsequent times running the function.

data() returns a list of currently loaded datasets or loads a dataset.

Packages are collections of R functions, data, and compiled code in a well-defined format, created to add specific functionality. The directories in R where the packages are stored are called the libraries.
library(help = somename) computes basic information about the package somename, and returns this in an object of class “packageInfo” . (The structure of this class may change in future versions.) When used with the default value ( NULL ) for lib. loc , the attached packages are searched before the libraries.