Differentiate between library() and require()?
Answer / Ravi Sahu
In R programming, both library() and require() are used for loading packages. However, they behave differently:
1. 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.
2. 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 |
Why we need data visualization in R?
Why are the VCD and lattice packages used?
How many tools for debugging present in r?
Explain statistical functions performed by R?
How will you create scatterplot matrices in r language?
Explain how you can start the r commander gui?
Explain about confusion matrix in r?
Explain r graphics devices?
How would you do a left and right join in r?
What is recursion in r?
Name the functions which help in importing data from other applications in R?
How many data structures R has?