В Tue, 28 Nov 2023 13:40:51 +0100
Göran Broström <g...@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

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to