[R-pkg-devel] NOTE or Information?
Ivan Krylov
kry|ov@r00t @end|ng |rom gm@||@com
Tue Nov 28 14:00:09 CET 2023
В Tue, 28 Nov 2023 13:40:51 +0100
Göran Broström <gb using ehar.se> пишет:
> I guess that this is a result of my use of devtools and roxygen for
> writing documentation. Is this a bug in rlang and the mask part of
> the message will go away when it is fixed?
Not exactly a bug. It just so happens that rlang exports a function
with the same name as a function already existing in a different
attached package. Same thing happens on a larger scale with other
packages too:
library(dplyr)
#
# Attaching package: 'dplyr'
#
# The following objects are masked from 'package:stats':
#
# filter, lag
#
# The following objects are masked from 'package:base':
#
# intersect, setdiff, setequal, union
As long as the authors of the package that masks functions from another
package are careful to preserve compatibility with the original
function (this typically happens when a package masks a function with
an S3 generic) or you remain aware that the function name is ambiguous,
you will avoid problems.
The `%||%` operators in base and rlang aren't implemented exactly the
same, but they should have the same semantics:
base::`%||%`
# function (x, y)
# if (is.null(x)) y else x
# <bytecode: 0x56054f642d40>
# <environment: namespace:base>
rlang::`%||%`
# function (x, y)
# {
# if (is_null(x))
# y
# else x
# }
# <bytecode: 0x560551c78dc8>
# <environment: namespace:rlang>
Since your eha package doesn't directly use rlang, you're welcome to
ignore this message.
--
Best regards,
Ivan
More information about the R-package-devel
mailing list