The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
collectcode
hook. The engine now falls back to the executable located when the
package was attached, and re-registers the hook, so it is no longer
necessary to detach("package:Statamarkdown") between
documents.stata.fig=TRUE: exports the graph
drawn by a Stata chunk and includes it in the output document. The
figure goes through knitr’s standard plot machinery, so
fig.cap, fig.alt (alternative text, for
accessibility), out.width, out.height,
fig.align, fig.link and fig.path
all work as for R chunks. The export format is set with
stata.fig.format (default "svg", which Stata
batch mode supports on all platforms). In Rmd and Quarto documents the
hyphenated spellings stata-fig and
stata-fig-format are also accepted when using YAML style
chunk options. (thanks @kylebutts in #28)purl_stata(), the Stata analogue of
knitr::purl(): extracts the code from the Stata chunks of
an R Markdown or Quarto document into a do-file, recording each chunk’s
header (label and options) as a Stata comment, and following
knitr::purl()’s documentation levels
(2 also carries the document text over as Stata comments).
Chunks with purl=FALSE or eval=FALSE are
skipped, including via option comments in any of the forms knitr accepts
in Stata chunks (#|, *|, //|).
(thanks @davidaarmstrong in #39)collectcode chunk option when knitr evaluates
chunks in a different directory to the document, for example for a
document in a subfolder of an RStudio project with the “Evaluate chunks
in directory: Project” option set, or when knitting with
rmarkdown::render(knit_root_dir=). The temporary
profile.do is now created, and any pre-existing
profile.do snapshot and restored, in the directory where
the chunks (and therefore Stata) run. (thanks @DaniMori in #17)TRUEspinstata() no longer overwrites its input file; a
statafile without a .do extension is now an
error, and the extension check is case-insensitive.collectcode chunk option when
engine.path is given as a plain string rather than a
list.profile.do created by
collectcode now locates the knitr::knit() call
on the call stack instead of assuming a hardcoded stack depth, making it
robust to changes in knitr’s internals, child documents, and different
ways of invoking knitr.cleanlog=TRUE now removes all lines of multi-line loop
commands and wrapped (continued) command lines from the output.cleanlog=TRUE no longer deletes genuine output lines
that begin with a decimal point.spinstata() block tracking when a marked-up block
starts and ends on the same line.spinstata() on R >= 4.3 when
producing Rnw or Rtex output.find_stata() on Windows now stops searching as soon as
an executable is found, and the non-existent “StataNow19” directory stub
has been removed from the search.find_stata() now searches
/Applications/StataNow on macOS, the StataNow directories
on Windows, and two additional installation directories on Linux.find_stata() for Stata 19 and the SSCC
installation path.find_stata() for Stata 19.collectcode chunk option for knitr >=
1.45..onAttach() to
.onLoad().find_stata() for Stata 18.spinstata().find_stata(),
suggested by Tom Palmer.find_stata() directory search on Linux,
using Sys.which().find_stata() for Stata 17, with macOS
fixes.eval chunk option.collectcode chunk option for linking code
blocks, spinstata() for spinning specially marked-up Stata
do-files into reports, and find_stata() to locate the Stata
executable on Windows, macOS, and Linux.These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.