rk.get.tempfile.name {rkward} | R Documentation |
In RKWard the output is saved as a html file which is located at "~/.rkward"
by default. (TODO: make this platform free). The name of this html
file can be retrieved and set using rk.get.output.html.file
and
rk.set.output.html.file
. rk.flush.output.html.file
will delete
the current (or specified) html file, and re-initialize it.
rk.get.tempfile.name(prefix = "image", extension = ".jpg") rk.get.workspace.url() rk.get.output.html.file() rk.set.output.html.file(x, additional.header.contents = getOption("rk.html.header.additions"), style = c("regular", "preview"), css = getOption("rk.output.css.file")) rk.flush.output(x = rk.get.output.html.file(), flush.images = TRUE, ask = TRUE, ...)
prefix |
a string, used as a filename prefix when saving images to the output file |
extension |
a string, used as a filename extension when saving images to the output file |
x |
a string, giving the filename of the of the output file |
additional.header.contents |
NULL or an additional string to add to the HTML header section. This could be scripts or additional CSS definitions, for example. Note that nothing will be added to the header, if the file already exists. |
style |
Currently either "regular" or "preview". The latter omits table of contents and date. |
css |
Local file name of CSS file to use, or NULL for no CSS file. The CSS file will be placed next to x, with file name extension ".css". Only effective when initializing a (non-existing) output file. |
ask |
Logical: Whether to ask before flushing the output file. |
... |
Further parameters passed to rk.set.output.html.file() |
flush.images. |
If true, any images used in the output file will be deleted as well. |
rk.get.tempfile.name
returns a non-existing filename inside the
directory of the output file. It is mainly used by rk.graph.on to
create filenames suitable for storing images in the output. The filenames of
the temporary files are of the form
"prefix
xyz.extension
". rk.get.tempfile.name
is
somewhat misnamed. For truly temporary files, tempfile is generally
more suitable.
rk.get.workspace.url
returns the url of workspace file which has been
loaded in RKWard, or NULL, if no workspace has been loaded. NOTE: This value
is note affected by running load
in R, only by loading R workspaces
via the RKWard GUI.
rk.get.tempfile.name
, rk.get.output.html.file
, and
rk.get.workspace.url
return a string while
rk.set.output.html.file
returns the previous output html file.
Thomas Friedrichsmeier rkward-devel@kde.org
rkward://page/rkward_output, tempfile, file, rk.print
testfile.name <- rk.get.tempfile.name(prefix="test", extension=".txt") testfile <- file(testfile.name) cat("This is a test\n", file=testfile) close(testfile) unlink(testfile.name) outfile <- rk.get.output.html.file() ## Not run rk.set.output.html.file("~/.rkward/another_file.html") rk.header("Output on a different output file") rk.show.html(rk.get.output.html.file()) rk.flush.output() rk.set.output.html.file(outfile)