diff --git a/R/backport_linter.R b/R/backport_linter.R index 6ab9acbc8..ad4fe0759 100644 --- a/R/backport_linter.R +++ b/R/backport_linter.R @@ -4,7 +4,7 @@ #' #' @param r_version Minimum R version to test for compatibility #' @param except Character vector of functions to be excluded from linting. -#' Use this to list explicitly defined backports, e.g. those imported from the {backports} package or manually +#' Use this to list explicitly defined backports, e.g. those imported from the `{backports}` package or manually #' defined in your package. #' #' @examples diff --git a/R/scalar_in_linter.R b/R/scalar_in_linter.R index ea64db002..89bd77f6f 100644 --- a/R/scalar_in_linter.R +++ b/R/scalar_in_linter.R @@ -1,7 +1,7 @@ #' Block usage like x %in% "a" #' #' `vector %in% set` is appropriate for matching a vector to a set, but if -#' that set has size 1, `==` is more appropriate. `%chin%` from `data.table` +#' that set has size 1, `==` is more appropriate. `%chin%` from `{data.table}` #' is matched as well. #' #' `scalar %in% vector` is OK, because the alternative (`any(vector == scalar)`) diff --git a/R/seq_linter.R b/R/seq_linter.R index 9622546b7..d6665a7f4 100644 --- a/R/seq_linter.R +++ b/R/seq_linter.R @@ -4,7 +4,7 @@ #' `1:NROW(...)` and `1:NCOL(...)` expressions in base-R, or their usage in #' conjunction with `seq()` (e.g., `seq(length(...))`, `seq(nrow(...))`, etc.). #' -#' Additionally, it checks for `1:n()` (from dplyr) and `1:.N` (from data.table). +#' Additionally, it checks for `1:n()` (from `{dplyr}`) and `1:.N` (from `{data.table}`). #' #' These often cause bugs when the right-hand side is zero. #' It is safer to use [base::seq_len()] or [base::seq_along()] instead. diff --git a/R/xp_utils.R b/R/xp_utils.R index 92deaf181..1a599d727 100644 --- a/R/xp_utils.R +++ b/R/xp_utils.R @@ -112,7 +112,7 @@ xp_find_location <- function(xml, xpath) { #' Strip XPath 2.0-style comments from an XPath #' -#' xml2 uses XPath 1.0, which has no support for comments. But comments are +#' `{xml2}` uses XPath 1.0, which has no support for comments. But comments are #' useful in a codebase with as many XPaths as we maintain, so we fudge our #' way to XPath 2.0-ish support by writing this simple function to remove comments. #' diff --git a/man/backport_linter.Rd b/man/backport_linter.Rd index 43aef329e..4d72027dd 100644 --- a/man/backport_linter.Rd +++ b/man/backport_linter.Rd @@ -10,7 +10,7 @@ backport_linter(r_version = getRversion(), except = character()) \item{r_version}{Minimum R version to test for compatibility} \item{except}{Character vector of functions to be excluded from linting. -Use this to list explicitly defined backports, e.g. those imported from the {backports} package or manually +Use this to list explicitly defined backports, e.g. those imported from the \code{{backports}} package or manually defined in your package.} } \description{ diff --git a/man/scalar_in_linter.Rd b/man/scalar_in_linter.Rd index 3108ca8c5..a51ea443b 100644 --- a/man/scalar_in_linter.Rd +++ b/man/scalar_in_linter.Rd @@ -8,7 +8,7 @@ scalar_in_linter() } \description{ \code{vector \%in\% set} is appropriate for matching a vector to a set, but if -that set has size 1, \code{==} is more appropriate. \verb{\%chin\%} from \code{data.table} +that set has size 1, \code{==} is more appropriate. \verb{\%chin\%} from \code{{data.table}} is matched as well. } \details{ diff --git a/man/seq_linter.Rd b/man/seq_linter.Rd index 88042ad6b..02c46af72 100644 --- a/man/seq_linter.Rd +++ b/man/seq_linter.Rd @@ -12,7 +12,7 @@ This linter checks for \code{1:length(...)}, \code{1:nrow(...)}, \code{1:ncol(.. conjunction with \code{seq()} (e.g., \code{seq(length(...))}, \code{seq(nrow(...))}, etc.). } \details{ -Additionally, it checks for \code{1:n()} (from dplyr) and \code{1:.N} (from data.table). +Additionally, it checks for \code{1:n()} (from \code{{dplyr}}) and \code{1:.N} (from \code{{data.table}}). These often cause bugs when the right-hand side is zero. It is safer to use \code{\link[base:seq]{base::seq_len()}} or \code{\link[base:seq]{base::seq_along()}} instead.