I created a new package in R and the functions in my package require pre-installed packages like igraph
, dplyr
to run properly. In the DESCRIPTION
file, I did add these packages in the Imports
field. But when I run my package, I am getting an error which indicates the packages required have not been installed.
To check what the problem is, I installed the pre-required packages separately and ran my package, and it seems to be working fine then.
This is how my DESCRIPTION
file looks like
Package: xxx
Type: Package
Title: xxx
Version: 0.1.0
Author: xxx
Maintainer: xxx
Description: xxx
License: GPL-2
Encoding: UTF-8
LazyData: FALSE
Imports:
igraph,dplyr,network,gridExtra,centiserve
RoxygenNote: 6.1.1
Is there anyway I could load just my package which then loads the pre-required packages automatically, without having to load pre-required packages like igraph
and dplyr
manually.