Difference between library () and require () functions in R language.
| library() | require() |
| Library () function gives an error message display, if the desired package cannot be loaded. | Require () function is used inside function and throws a warning messages whenever a particular package is not Found |
| It loads the packages whether it is already loaded or not, | It just checks that it is loaded, or loads it if it isn’t (use in functions that rely on a certain package). The documentation explicitly states that neither function will reload an already loaded package. |
