-
Notifications
You must be signed in to change notification settings - Fork 238
Description
Creating a package with usethis::create_package(), roxygen2 v 7.3.0,
Adding re-exported functions from lubridate in the /R/lubridate.R file:
#' @export
#' @importFrom lubridate %m+%
lubridate::`%m+%`
#' @export
#' @importFrom lubridate %m-%
lubridate::`%m-%`
As shown here: 11.8.2 Re-exporting
The first two times the package is documented devtools::document(), when reexports.Rd is created, it will switch %m+% to %m-% and vice verse.
However, if the package is documented a third time, there is no change, but if the package is checked - devtools::check(), (which writes reexport.Rd again), the bug re-appears and the functions operators switch places in the man pages doc.
Note that the reexports.Rd contents \alias{%m+%} never changes, nor the \link to the function, only the actual symbol changes from + to - and - to +.
Contents reexports.Rd :
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/reexport.R
\docType{import}
\name{reexports}
\alias{reexports}
\alias{\%m+\%}
\alias{\%m-\%}
\title{Objects exported from other packages}
\keyword{internal}
\description{
These objects are imported from other packages. Follow the links
below to see their documentation.
\describe{
\item{lubridate}{\code{\link[lubridate:mplus]{\%m-\%}}, \code{\link[lubridate:mplus]{\%m+\%}}}
}}`
\describe{
\item{lubridate}{\code{\link[lubridate:mplus]{\%m+\%}}, \code{\link[lubridate:mplus]{\%m-\%}}}
}}
After further investigation, it appears that lubridate calls both functions mplus. So perhaps this is a bug with lubridate and not roxygen2?