I'm using knit within R to create my Latex document. The document is a report that involves data analysis. My problem is that I want to report the outcomes of the calculations (which I only know after the document is processed) in the Executive Summary (which is naturally at the start of the document). I could do all the calculations before the ES and then report them in the body but that creates its own inconveniences.
So, I'm looking for something like (edited; original example was needlessly general):
\begin{part}{first}
\chapter{Introduction}
...
\chapter{Data}
...
\chapter{Analysis}
...
\end{part}{first}
\chapter*{Executive Summary}
...
\print{first}
Any thoughts? Could I capture the first part in an environment and print it later? Thanks all!

\newcommand\myresults{some text here}to define a new macro\myresultswithout printing the text. You can then use\myresultswherever you want in your document (not before the definition, of course) to actually print the text. There may be better solutions, depending on the type of data you are trying to print. – siracusa Jul 05 '19 at 04:34