When I included janitor package with other packages, it did not load.
library(MASS, caret, stepPlr, janitor)
Error in library(MASS, caret, stepPlr, janitor) : object 'janitor' not found
When I ran that command separately with only janitor package, it got loaded into session; with no error
> library(janitor)
Warning message:
package ‘janitor’ was built under R version 3.3.3
Is there any limit with including x number of packages at a time? Or there is something wrong with my RStudio?
The function p_load from the pacman package allows for listing multiple packages like this, and will install them if any are not already present:
library(pacman)
p_load(MASS, caret, stepPlr, janitor)
This is not only user-friendly, it also improves reproducibility for running the same script across multiple users or environments.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With