Differentiate between library() and require()?
Answer / Ravi Sahu
In R programming, both library() and require() are used for loading packages. However, they behave differently:n1. library(): Loads a package if it's not already loaded and adds it to the search path (.libPaths()). If the package is already loaded, it doesn't show any message.n2. require(): Also loads a package but throws an error if the package is not found in the search path. If the package is already loaded, it doesn't show any message.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the difference between a bar-chart and a histogram?
What is readline() in r?
How many ways are there to read and write files?
Explain the concept of principal component analysis?
How to remove all the objects?
What is an Atomic vector and how many types of atomic vectors are present in R?
What is oop in r?
What are problems with R clustering?
How many data structures does r language have?
How many methods are there to save graphs?
What is R studio and how to use it?
What is the use of apply() in R?