Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: more consisten type annotations #273

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/anyInfinite.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' @description
#' Supported are atomic types (see \code{\link[base]{is.atomic}}), lists and data frames.
#'
#' @param x [\code{ANY}]\cr
#' @param x [\code{any}]\cr
#' Object to check.
#' @return [\code{logical(1)}] Returns \code{TRUE} if any element is \code{-Inf} or \code{Inf}.
#' @useDynLib checkmate c_any_infinite
Expand Down
2 changes: 1 addition & 1 deletion R/anyMissing.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' a single non-missing observation present in the \code{data.frame}, use
#' \code{all(sapply(df, allMissing))} instead.
#'
#' @param x [\code{ANY}]\cr
#' @param x [\code{any}]\cr
#' Object to check.
#' @return [\code{logical(1)}] Returns \code{TRUE} if any (\code{anyMissing}) or all (\code{allMissing})
#' elements of \code{x} are missing (see details), \code{FALSE} otherwise.
Expand Down
2 changes: 1 addition & 1 deletion R/anyNaN.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' @description
#' Supported are atomic types (see \code{\link[base]{is.atomic}}), lists and data frames.
#'
#' @param x [\code{ANY}]\cr
#' @param x [\code{any}]\cr
#' Object to check.
#' @return [\code{logical(1)}] Returns \code{TRUE} if any element is \code{NaN}.
#' @useDynLib checkmate c_any_nan
Expand Down
2 changes: 1 addition & 1 deletion R/asInteger.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#' \code{\link{assertInt}} or \code{\link{assertIntegerish}} with
#' argument \code{coerce} set to \code{TRUE} instead.
#'
#' @param x [any]\cr
#' @param x [\code{any}]\cr
#' Object to convert.
#' @template na-handling
#' @inheritParams checkInteger
Expand Down
4 changes: 2 additions & 2 deletions R/assert.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' \code{combine} is \dQuote{and} and all checks evaluate to \code{TRUE}.
#' Otherwise, \code{assert} throws an informative error message.
#'
#' @param ... [any]\cr
#' @param ... [\code{any}]\cr
#' List of calls to check functions.
#' @param combine [\code{character(1)}]\cr
#' \dQuote{or} or \dQuote{and} to combine the check functions with an OR
Expand Down Expand Up @@ -62,7 +62,7 @@ assert = function(..., combine = "or", .var.name = NULL, add = NULL) {
# Error handling in assert()
#
# Internal helper function to handle errors in assert().
# @param res [character(1)}]\cr
# @param res [\code{character(1)}]\cr
# error message
# @param v_name [\code{character}]\cr
# Name(s) of the variable(s) whose assertion failed.
Expand Down
2 changes: 1 addition & 1 deletion R/checkCharacter.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @template x
#' @template na-handling
#' @inheritParams checkVector
#' @param pattern [\code{character(1L)}]\cr
#' @param pattern [\code{character(1)}]\cr
#' Regular expression as used in \code{\link[base]{grepl}}.
#' All non-missing elements of \code{x} must comply to this pattern.
#' @param fixed [\code{character(1)}]\cr
Expand Down
2 changes: 1 addition & 1 deletion R/checkNamed.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#'
#' @templateVar fn Named
#' @template x
#' @param type [character(1)]\cr
#' @param type [\code{character(1)}]\cr
#' Select the check(s) to perform.
#' \dQuote{unnamed} checks \code{x} to be unnamed.
#' \dQuote{named} (default) checks \code{x} to be named which excludes names to be \code{NA} or empty (\code{""}).
Expand Down
2 changes: 1 addition & 1 deletion R/checkNames.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#' @templateVar fn Names
#' @param x [\code{character} || \code{NULL}]\cr
#' Names to check using rules defined via \code{type}.
#' @param type [character(1)]\cr
#' @param type [\code{character(1)}]\cr
#' Type of formal check(s) to perform on the names.
#' \describe{
#' \item{unnamed:}{Checks \code{x} to be \code{NULL}.}
Expand Down
4 changes: 2 additions & 2 deletions R/coalesce.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#' Returns the left hand side if not missing nor \code{NULL}, and
#' the right hand side otherwise.
#'
#' @param lhs [any]\cr
#' @param lhs [\code{any}]\cr
#' Left hand side of the operator. Is returned if not missing or \code{NULL}.
#' @param rhs [any]\cr
#' @param rhs [\code{any}]\cr
#' Right hand side of the operator. Is returned if \code{lhs} is missing or \code{NULL}.
#' @return Either \code{lhs} or \code{rhs}.
#' @export
Expand Down
6 changes: 3 additions & 3 deletions R/matchArg.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
#' The behavior is very similar to \code{\link[base]{match.arg}}, except that \code{NULL} is not
#' a valid value for \code{x}.
#'
#' @param x [character]\cr
#' @param x [\code{character}]\cr
#' User provided argument to match.
#' @param choices [character()]\cr
#' @param choices [\code{character}]\cr
#' Candidates to match \code{x} with.
#' @param several.ok [logical(1)]\cr
#' @param several.ok [\code{logical(1)}]\cr
#' If \code{TRUE}, multiple matches are allowed, cf. \code{\link[base]{match.arg}}.
#' @template add
#' @template var.name
Expand Down
2 changes: 1 addition & 1 deletion R/qassert.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#' The provided functions parse rules which allow to express some of the most
#' frequent argument checks by typing just a few letters.
#'
#' @param x [any]\cr
#' @param x [\code{any}]\cr
#' Object the check.
#' @param rules [\code{character}]\cr
#' Set of rules. See details.
Expand Down
2 changes: 1 addition & 1 deletion R/vname.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' Tries to heuristically determine the variable name of \code{x} in the parent frame
#' with a combination of \code{\link[base]{deparse}} and \code{\link[base]{substitute}}.
#' Used for checkmate's error messages.
#' @param x [ANY]\cr
#' @param x [\code{any}]\cr
#' Object.
#' @return [\code{character(1)}] Variable name.
#' @export
Expand Down
2 changes: 1 addition & 1 deletion man-roxygen/x.R
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#' @param x [any]\cr
#' @param x [\code{any}]\cr
#' Object to check.
2 changes: 1 addition & 1 deletion man/anyInfinite.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/anyMissing.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/anyNaN.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/asInteger.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/assert.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/checkAccess.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/checkArray.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/checkAtomic.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/checkAtomicVector.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/checkCharacter.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/checkChoice.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/checkClass.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/checkComplex.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/checkCount.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/checkDataFrame.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/checkDataTable.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/checkDate.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/checkDirectoryExists.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/checkDisjunct.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/checkDouble.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/checkEnvironment.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/checkFALSE.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/checkFactor.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/checkFileExists.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/checkFlag.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/checkFormula.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/checkFunction.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/checkInt.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/checkInteger.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading