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))])
}
|