I'm preparing a package for initial submission to CRAN. (Here is the GitHub link.)
In my R CMD check, I'm getting the following Note:
Found the following URLs which should use \doi (with the DOI name only):
File ‘get_lhy_data.Rd’:
https://doi.org/10.1086/723805
Here is the relevant portion of my roxygen documentation for that function:
#' Get replication data from Harbridge-Yong et al. (2023)
#'
#' @description
#' `get_voteview_members()` returns replication data from:
#'
#' * Harbridge-Yong, L., Volden, C., & Wiseman, A. E. (2023).
#' The bipartisan path to effective lawmaking.
#' *The Journal of Politics*, *85*(3), 1048–1063.
#' <https://doi.org/10.1086/723805>
#'
#' or "LHY et al." for short.
How should I format the DOI number to address this Note?
I tried: replacing <https://doi.org/10.1086/723805> with \doi{10.1086/723805}, but that caused the rendered documentation to look wrong:
Description
get_voteview_members() returns replication data from:
Harbridge-Yong, L., Volden, C., & Wiseman, A. E. (2023). The bipartisan path to effective lawmaking. The Journal of Politics, 85(3), 1048–1063. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1086/723805")}
I didn't remember the syntax for this field so used GitHub · Where software is built to find an example. Noting this in case you didn't know about GitHub search. In particular you can restrict results to the "cran" user which is a mirror of CRAN packages.
for that portion. Do you think this might be because I'm viewing the preview documentation? Will this be solved when the package is actually released? Seems unlikely to me; I'm just brainstorming.