If you do select <- MASS::select
you should be fine.
If you really don't want it in your global workspace you could do, after attaching MASS
(optionally), and dplyr
:
attach(list(select=MASS::select),name = "front_select")
This way it will find this one before the others because the environment front_select
will be met first in the search path.
That's not very orthodox though.
This is assuming you want this for interactive use, if not by all means use ::
notation.
Actually what you're asking for is possible, though it's a lot of black wizardry, and I have a feeling I'll get downvoted for this, but this answers the question :
library(dplyr)
x <- as.list(as.environment("package:dplyr"))
detach("package:dplyr")
x$select <- NULL
attach(x,name = "package:dplyr")
mutate
# function (.data, ...)
# {
# UseMethod("mutate")
# }
# <bytecode: 0x00000000190069c0>
# <environment: namespace:dplyr>
select
# Error: object 'select' not found
from ?search
:
Names starting "package:" are reserved for library and should not be
used by end users.