No, the user does not need to download packages that are used by features in my_package.
The fact that you specified a package under Imports:in the file DESCRIPTIONmeans that during the installation, my_packageR checks for the presence of this package on your system. This means that functions in my_packagecan use functions from these packages, using the notation ::, as you suggested.
:: - , :
, dplyr :: my_package, import(dplyr) NAMESPACE. , .
, , select dplyr, importFrom(select, dplyr) NAMESPACE.
DESCRIPTION Depends:. , , library(my_package). .
R , my_package " " , . , , , select() dplyr, . Depends:, . my_package , - select() , my_package , .
1:
DESCRIPTION :
Imports:
dpylr
my_package:
my_fun <- function(...) {
dplyr::mutate(...) %>%
dplyr::select(1:3)
}
2:
DESCRIPTION :
Imports:
dpylr
NAMESPACE :
import(dplyr)
my_package:
my_fun <- function(...) {
mutate(...) %>%
select(1:3)
}
3:
DESCRIPTION :
Imports:
dpylr
NAMESPACE :
importFrom(select, dplyr)
my_package:
my_fun <- function(...) {
dpylr::mutate(...) %>%
select(1:3)
}
, R . , :