% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{tryEval}
\alias{tryEval}
\title{Try to evaluate an expression and return a default value if
an error occurs or otherwise return its value.}
\usage{
tryEval(expr, def = NULL)
}
\arguments{
\item{expr}{the expression to evaluate}

\item{def}{the default value if an error occurs in the evaluation
of \code{expr}}
}
\description{
Try to evaluate an expression and return a default value if
an error occurs or otherwise return its value.
}
\examples{
x <- list(a=c(x=1,y=2),b=c(x=2,p=3))
list.map(x, tryEval(x+y, NA))
}

