File: grapes-except-grapes.Rd

package info (click to toggle)
r-cran-logger 0.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,324 kB
  • sloc: sh: 13; makefile: 2
file content (32 lines) | stat: -rw-r--r-- 920 bytes parent folder | download
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
27
28
29
30
31
32
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/try.R
\name{\%except\%}
\alias{\%except\%}
\title{Try to evaluate an expressions and evaluate another expression on
exception}
\usage{
try \%except\% except
}
\arguments{
\item{try}{R expression}

\item{except}{fallback R expression to be evaluated if \code{try} fails}
}
\description{
Try to evaluate an expressions and evaluate another expression on
exception
}
\note{
Suppress log messages in the \code{except} namespace if you don't
want to throw a \code{WARN} log message on the exception branch.
}
\examples{
everything \%except\% 42
everything <- "640kb"
everything \%except\% 42

FunDoesNotExist(1:10) \%except\% sum(1:10) / length(1:10)
FunDoesNotExist(1:10) \%except\% (sum(1:10) / length(1:10))
FunDoesNotExist(1:10) \%except\% MEAN(1:10) \%except\% mean(1:10)
FunDoesNotExist(1:10) \%except\% (MEAN(1:10) \%except\% mean(1:10))
}