Render and save a table in png or pdf format
an stable object.
the final output file name; if file
has .tex
extension, the
extension will be replaced with the value in format
; if provided as a
complete path, directory information will be used as dir
(see below).
used to form the final output file name; this argument will
override what is provided in file
.
the output file format.
the final output directory; will be overridden if file
is
given as a complete path.
the directory where the image will be built.
passed to st_aspdf()
or st_aspng()
, depending on the value of
format
.
There is considerable flexibility for specifying the output file name. This flexibility is provided to accommodate several potential different anticipated workflows.
file
can be obtained from the stable_file
attribute on x
; this
attribute is set when the user specifies the output file name via
st_files()
; if a .tex
extension is found on file
, it will be
changed to the value found in format
; in this case, file
is not
expected to contain the full path and the output directory can be
specified by dir
file
can be passed by the user; in this case, a complete path can
be provided to the output file; this path will override
what is in dir
and a warning is given in case path location is found in
both sources; if a .tex
extension is found on file
, it will be changed
to the value found in format
stem
and format
can be passed and the output file name will be
<dir>/<stem>.<format>
tab <- stable(stdata(), output_file = "foo.tex")
if (FALSE) { # \dontrun{
ans <- stable_save_image(tab, format = "pdf")
basename(ans)
st_image_show(ans)
} # }