I'd like to be able to write down formulas in R syntax as equations, i.e. I'd like to do something like this:
\begin{requation}
time ~ (poly(I(1/nprocs), 2) + poly(ndoms, 2) + poly(nDOF, 2))^3
\end{requation}
while the equation would be numbered together with ordinary equations and its content would be the simple text with \texttt{}. So, I need no math-mode inside the environment.
Do you know, how to do it?
EDIT
I've tried something like this
\newenvironment{requation}
{%
\VerbatimEnvironment
\begin{Verbatim}
}
{
\end{Verbatim}
\refstepcounter{equation}\hfill(\theequation)}
The only problem is, that in this case there is a newline after \end{Verbatim} which I don't want - is there any possibility to get rid of it?

equationenvironments, and mark the R code with\verb|...|. – Thruston Apr 09 '17 at 20:37verbis exactly, what I'm looking for. Could you, please, expand your comment into an answer, so I could accept it? – Eenoku Apr 09 '17 at 23:21