I am working on one of my functions which eventually wanted to publish as a package through my Github page.
One of the dependent library is dplyr .
I am importing the function mutate, group_by using the following code.
@importFrom dplyr mutate group_by
in my script.
I was wondering whether this will automatically suggest the user download the dplyr package if the user didn't install it. If not, how can I do it?
You don't need to do anything else , but run roxygen2 (or devtools::document()) which generates a NAMESPACE file, and your package cannot be loaded without dplyr.
Using the common ways to install packages, your package cannot even be installed without dplyr.