File: coalesce.Rd

package info (click to toggle)
r-cran-checkmate 2.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,504 kB
  • sloc: ansic: 2,196; sh: 9; makefile: 8
file content (26 lines) | stat: -rw-r--r-- 638 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/coalesce.R
\name{\%??\%}
\alias{\%??\%}
\title{Coalesce operator}
\usage{
lhs \%??\% rhs
}
\arguments{
\item{lhs}{[any]\cr
Left hand side of the operator. Is returned if not missing or \code{NULL}.}

\item{rhs}{[any]\cr
Right hand side of the operator. Is returned if \code{lhs} is missing or \code{NULL}.}
}
\value{
Either \code{lhs} or \code{rhs}.
}
\description{
Returns the left hand side if not missing nor \code{NULL}, and
the right hand side otherwise.
}
\examples{
print(NULL \%??\% 1 \%??\% 2)
print(names(iris) \%??\% letters[seq_len(ncol(iris))])
}