\HeaderA{withVisible}{Return both a value and its visibility}{withVisible}
\keyword{programming}{withVisible}
\begin{Description}\relax
This function evaluates an expression, returning it in a two element list
containing its value and a flag showing whether it would automatically print.
\end{Description}
\begin{Usage}
\begin{verbatim}
withVisible(x)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] An expression to be evaluated. 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The argument is evaluated in the caller's context.
\end{Details}
\begin{Value}
\begin{ldescription}
\item[\code{value }] The value of \code{x} after evaluation.
\item[\code{visible }] logical; whether the value would auto-print.
\end{ldescription}
\end{Value}
\begin{SeeAlso}\relax
\code{\LinkA{invisible}{invisible}}, \code{\LinkA{eval}{eval}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
x <- 1
withVisible(x <- 1)
x
withVisible(x)

# Wrap the call in evalq() for special handling

df <- data.frame(a=1:5, b=1:5)
evalq(withVisible(a + b), envir=df)
\end{ExampleCode}
\end{Examples}

