Concrete example:
In my package, one of my functions uses grep
form the base
package.
Should I explicitly import grep
or would that just introduce useless dependencies? I mean, everyone already has the base
package, right?
For the sake of illustration:
#' Group_by with regex based column selection
#' Similar to `group_by` but grouping columns are selected with a regex.
#' @importFrom dplyr group_by
#' @importFrom base grep
#' @export
group_at <- function(df, pattern)
group_by_(df, .dots=grep(names(df), pattern=pattern, value=T))