[rkward] /: Add R level functions to control output captures.
Thomas Friedrichsmeier
null at kde.org
Wed Oct 3 20:54:38 BST 2018
Git commit bd959ad11095fb22e812e061b2d6193c2e92a2a1 by Thomas Friedrichsmeier.
Committed on 03/10/2018 at 19:51.
Pushed by tfry into branch 'master'.
Add R level functions to control output captures.
M +1 -0 ChangeLog
M +18 -1 rkward/rbackend/rkrbackend.cpp
M +8 -6 rkward/rbackend/rkrbackendprotocol_shared.cpp
M +3 -3 rkward/rbackend/rkrbackendprotocol_shared.h
M +3 -1 rkward/rbackend/rpackages/rkward/NAMESPACE
M +29 -0 rkward/rbackend/rpackages/rkward/R/rk.print-functions.R
M +2 -4 rkward/rbackend/rpackages/rkward/man/RKdevice.Rd
A +19 -0 rkward/rbackend/rpackages/rkward/man/rk.adjust.system.path.Rd
M +5 -10 rkward/rbackend/rpackages/rkward/man/rk.assign.preview.data.Rd
M +1 -2 rkward/rbackend/rpackages/rkward/man/rk.call.plugin.Rd
A +29 -0 rkward/rbackend/rpackages/rkward/man/rk.capture.output.Rd
M +7 -14 rkward/rbackend/rpackages/rkward/man/rk.embed.device.Rd
M +5 -3 rkward/rbackend/rpackages/rkward/man/rk.get.tempfile.name.Rd
M +3 -6 rkward/rbackend/rpackages/rkward/man/rk.graph.on.Rd
M +4 -8 rkward/rbackend/rpackages/rkward/man/rk.list.plugins.Rd
M +3 -6 rkward/rbackend/rpackages/rkward/man/rk.load.pluginmaps.Rd
M +1 -2 rkward/rbackend/rpackages/rkward/man/rk.old.packages.Rd
M +1 -2 rkward/rbackend/rpackages/rkward/man/rk.record.commands.Rd
M +1 -2 rkward/rbackend/rpackages/rkward/man/rk.screen.device.Rd
M +1 -2 rkward/rbackend/rpackages/rkward/man/rk.show.messages.Rd
M +3 -6 rkward/rbackend/rpackages/rkward/man/rk.switch.frontend.language.Rd
M +7 -14 rkward/rbackend/rpackages/rkward/man/rk.with.window.hints.Rd
https://commits.kde.org/rkward/bd959ad11095fb22e812e061b2d6193c2e92a2a1
diff --git a/ChangeLog b/ChangeLog
index 13fa1374..fa1f08a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
--- Version 0.7.1 - UNRELEASED
+- New R functions rk.capture.output() and and rk.end.capture.output()
- Allow to reference current script file in plugins TODO: Test this
- Add various live-preview options for R scripts, including a preview of R markdown rendering
- Make it possible to "link" to specific settings pages from the internal documentation
diff --git a/rkward/rbackend/rkrbackend.cpp b/rkward/rbackend/rkrbackend.cpp
index 96f004a5..b5b33416 100644
--- a/rkward/rbackend/rkrbackend.cpp
+++ b/rkward/rbackend/rkrbackend.cpp
@@ -1022,6 +1022,22 @@ SEXP doCopyNoEval (SEXP fromname, SEXP fromenv, SEXP toname, SEXP toenv) {
return (R_NilValue);
}
+SEXP doCaptureOutput (SEXP mode, SEXP capture_messages, SEXP capture_output, SEXP suppress_messages, SEXP suppress_output) {
+ RK_TRACE (RBACKEND);
+
+ if (RKRSupport::SEXPToInt (mode) == 1) {
+ int cm = 0;
+ if (RKRSupport::SEXPToInt (capture_messages)) cm |= RKROutputBuffer::RecordMessages;
+ if (RKRSupport::SEXPToInt (capture_output)) cm |= RKROutputBuffer::RecordOutput;
+ if (RKRSupport::SEXPToInt (suppress_messages)) cm |= RKROutputBuffer::SuppressMessages;
+ if (RKRSupport::SEXPToInt (suppress_output)) cm |= RKROutputBuffer::SuppressOutput;
+ RKRBackend::this_pointer->pushOutputCapture (cm);
+ return (R_NilValue);
+ } else {
+ return RKRSupport::StringListToSEXP (QStringList (RKRBackend::this_pointer->popOutputCapture (RKRSupport::SEXPToInt (mode) == 2)));
+ }
+}
+
SEXP RKStartGraphicsDevice (SEXP width, SEXP height, SEXP pointsize, SEXP family, SEXP bg, SEXP title, SEXP antialias);
SEXP RKD_AdjustSize (SEXP devnum);
SEXP doWs (SEXP name);
@@ -1111,6 +1127,7 @@ bool RKRBackend::startR () {
{ "rk.dialog", (DL_FUNC) &doDialog, 7 },
{ "rk.update.locale", (DL_FUNC) &doUpdateLocale, 0 },
{ "rk.locale.name", (DL_FUNC) &doLocaleName, 0 },
+ { "rk.capture.output", (DL_FUNC) &doCaptureOutput, 5 },
{ "rk.graphics.device", (DL_FUNC) &RKStartGraphicsDevice, 7},
{ "rk.graphics.device.resize", (DL_FUNC) &RKD_AdjustSize, 1},
{ 0, 0, 0 }
@@ -1457,7 +1474,7 @@ void RKRBackend::startOutputCapture () {
void RKRBackend::printAndClearCapturedMessages (bool with_header) {
RK_TRACE (RBACKEND);
- QString out = popOutputCapture ();
+ QString out = popOutputCapture (true);
if (out.isEmpty ()) return;
if (with_header) out.prepend ("<h2>Messages, warnings, or errors:</h2>\n");
diff --git a/rkward/rbackend/rkrbackendprotocol_shared.cpp b/rkward/rbackend/rkrbackendprotocol_shared.cpp
index 131c6e8e..0503dfe6 100644
--- a/rkward/rbackend/rkrbackendprotocol_shared.cpp
+++ b/rkward/rbackend/rkrbackendprotocol_shared.cpp
@@ -106,7 +106,7 @@ void RKROutputBuffer::pushOutputCapture (int capture_mode) {
output_captures.append (capture);
}
-QString RKROutputBuffer::popOutputCapture () {
+QString RKROutputBuffer::popOutputCapture (bool highlighted) {
RK_TRACE (RBACKEND);
if (output_captures.isEmpty ()) {
@@ -123,7 +123,7 @@ QString RKROutputBuffer::popOutputCapture () {
if (output->output.isEmpty ()) continue;
if (output->type != ROutput::Error) { // NOTE: skip error output. It has already been written as a warning.
- if (output->type != previous_type) {
+ if (highlighted && (output->type != previous_type)) {
if (!ret.isEmpty ()) ret.append ("</pre>\n");
if (output->type == ROutput::Output) ret.append ("<pre class=\"output_normal\">");
@@ -133,11 +133,13 @@ QString RKROutputBuffer::popOutputCapture () {
ret.append ("<pre>");
}
}
- ret.append (output->output.toHtmlEscaped ());
+ if (highlighted) ret.append (output->output.toHtmlEscaped ());
+ else ret.append (output->output);
+
previous_type = output->type;
}
}
- if (!ret.isEmpty ()) ret.append ("</pre>\n");
+ if (highlighted && !ret.isEmpty ()) ret.append ("</pre>\n");
return ret;
}
@@ -175,10 +177,10 @@ bool RKROutputBuffer::handleOutput (const QString &output, int buf_length, ROutp
OutputCapture &cap = output_captures[i];
if (output_type == ROutput::Output) {
if (cap.mode & RecordOutput) appendToOutputList (&(cap.recorded), output, output_type);
- if (cap.mode & EatOutput) return previously_empty;
+ if (cap.mode & SuppressOutput) return previously_empty;
} else {
if (cap.mode & RecordMessages) appendToOutputList (&(cap.recorded), output, output_type);
- if (cap.mode & EatMessages) return previously_empty;
+ if (cap.mode & SuppressMessages) return previously_empty;
}
}
diff --git a/rkward/rbackend/rkrbackendprotocol_shared.h b/rkward/rbackend/rkrbackendprotocol_shared.h
index 3e5ab79c..c789d5ad 100644
--- a/rkward/rbackend/rkrbackendprotocol_shared.h
+++ b/rkward/rbackend/rkrbackendprotocol_shared.h
@@ -137,11 +137,11 @@ public:
enum CaptureMode {
RecordMessages = 1,
RecordOutput = 2,
- EatMessages = 4,
- EatOutput = 8
+ SuppressMessages = 4,
+ SuppressOutput = 8
};
void pushOutputCapture (int capture_mode);
- QString popOutputCapture ();
+ QString popOutputCapture (bool highlighted);
/** Flushes current output buffer. Meant to be called from RInterface::flushOutput, only.
@param forcibly: if true, will always flush the output. If false, will flush the output only if the mutex can be locked without waiting. */
diff --git a/rkward/rbackend/rpackages/rkward/NAMESPACE b/rkward/rbackend/rpackages/rkward/NAMESPACE
index de54d453..1d313fd6 100644
--- a/rkward/rbackend/rpackages/rkward/NAMESPACE
+++ b/rkward/rbackend/rpackages/rkward/NAMESPACE
@@ -52,10 +52,11 @@ export(q)
export(quartz)
export(quit)
export(require)
-export(rk.askYesNo)
export(rk.adjust.system.path)
+export(rk.askYesNo)
export(rk.assign.preview.data)
export(rk.call.plugin)
+export(rk.capture.output)
export(rk.clear.plot.history)
export(rk.demo)
export(rk.describe.alternative)
@@ -64,6 +65,7 @@ export(rk.duplicate.device)
export(rk.edit)
export(rk.edit.files)
export(rk.embed.device)
+export(rk.end.capture.output)
export(rk.first.plot)
export(rk.flush.output)
export(rk.force.append.plot)
diff --git a/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R b/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R
index 20f5644e..d71853c0 100644
--- a/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R
+++ b/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R
@@ -264,3 +264,32 @@
}
res
}
+
+#' Capture output including system commands
+#'
+#' This feature records and / or redirects output similar to the \code{\link{sink}} and \code{\link{capture.output}}
+#' commands provided with R. Contrary to these two, \code{rk.capture.output} can also capture output generated by external
+#' programs running via \code{\link{system}} (on both Windows and Unix platforms). Further it allows to capture both
+#' warning messages and regular output to the same channel. Output can be passed on for printing, or suppressed,
+#' with the default being to print it.
+#'
+#' And arbitrary number of ouptut captures can be started and stopped, and these will form a push/pop stack.
+#'
+#' \code{rk.capture.output} Starts capturing output.
+#'
+#' \code{rk.end.capture.output} Stops capturing output, and returns the recorded output in a string.
+#'
+#' @param LANG language code to use. "C" for no translation, i.e. generally English
+#'
+#' @export
+#' @rdname rk.capture.output
+"rk.capture.output" <- function (capture.messages = TRUE, capture.output = TRUE, suppress.messages = FALSE, suppress.output = FALSE) {
+ .Call ("rk.capture.output", 1, isTRUE (capture.messages), isTRUE (capture.output), isTRUE (suppress.messages), isTRUE (suppress.output), PACKAGE="(embedding)");
+ invisible (NULL)
+}
+
+#' @export
+#' @rdname rk.capture.output
+"rk.end.capture.output" <- function (highlight = FALSE) {
+ .Call ("rk.capture.output", if (isTRUE (highlight)) 2 else 3, FALSE, FALSE, FALSE, FALSE, PACKAGE="(embedding)");
+}
diff --git a/rkward/rbackend/rpackages/rkward/man/RKdevice.Rd b/rkward/rbackend/rpackages/rkward/man/RKdevice.Rd
index 037a689a..af3eaf2a 100644
--- a/rkward/rbackend/rpackages/rkward/man/RKdevice.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/RKdevice.Rd
@@ -16,8 +16,7 @@ RK(width = getOption("rk.screendevice.width"),
\item{pointsize}{Default pointsize}
\item{family}{Default font family. This can be a character vector of length 1 or 2. The second value is used for
-plotting symbols. Effectively the default is c("Helvetica",
- "Symbol"). A wide variety of sepcification is supported,
+plotting symbols. Effectively the default is c("Helvetica", "Symbol"). A wide variety of sepcification is supported,
including the device independent fonts names "sans", "serif", and "mono"}
\item{bg}{Background color.}
@@ -28,7 +27,6 @@ including the device independent fonts names "sans", "serif", and "mono"}
}
\description{
\code{RK()} creates an R on-screen device that will be rendered in the RKWard frontend.
-The default settings for \code{width},
- and \code{height} can be modified from Settings -> Configure RKWard -> Onscreen Graphics.
+The default settings for \code{width}, and \code{height} can be modified from Settings -> Configure RKWard -> Onscreen Graphics.
}
\keyword{devices}
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.adjust.system.path.Rd b/rkward/rbackend/rpackages/rkward/man/rk.adjust.system.path.Rd
new file mode 100644
index 00000000..6de1941b
--- /dev/null
+++ b/rkward/rbackend/rpackages/rkward/man/rk.adjust.system.path.Rd
@@ -0,0 +1,19 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/rk.utility-functions.R
+\name{rk.adjust.system.path}
+\alias{rk.adjust.system.path}
+\title{Add one or more paths to the filesystem search path used in this session}
+\usage{
+rk.adjust.system.path(add)
+}
+\arguments{
+\item{add}{Paths to add. May be missing, in which case the path will no be touched.}
+}
+\value{
+A vector of the directories in the file sytem path after the adjustment
+}
+\description{
+Add the given path to to the "PATH" environment variable of the running R session. This
+can be useful to make sure external binaries are found by Sys.which. Paths are normalized
+before being added, and duplicates are stripped from the path.
+}
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.assign.preview.data.Rd b/rkward/rbackend/rpackages/rkward/man/rk.assign.preview.data.Rd
index 7975da03..9b30a067 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.assign.preview.data.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.assign.preview.data.Rd
@@ -17,8 +17,7 @@ rk.discard.preview.data(id)
\arguments{
\item{id}{(character). Id associated with the data. Usually this will be the 'id' value of the <preview>-box.}
-\item{value.}{The value to assign. If this is a list,
- and contains a function named "on.delete", this function
+\item{value.}{The value to assign. If this is a list, and contains a function named "on.delete", this function
will be run by rk.discard.preview.data (with the \code{id} as argument. This is useful for running custom clearnup
code, such as removing temporary files, etc.}
}
@@ -26,10 +25,8 @@ code, such as removing temporary files, etc.}
\code{rk.assign.preview.data} amd \code{rk.get.preview.data} returns the preview data (newly) associated
with the given id. \code{rk.discard.preview.data} returns \code{NULL}, invisibly.
-\bold{Note}: Plugins that want to produce a single plot,
- or open a single object via \code{\link{rk.edit}()} do \bold{not}
- have to call these functions,
- manually. See the chapter on providing previews in the Introduction to
+\bold{Note}: Plugins that want to produce a single plot, or open a single object via \code{\link{rk.edit}()} do \bold{not}
+ have to call these functions, manually. See the chapter on providing previews in the Introduction to
writing plugins for RKWard.
}
\description{
@@ -37,10 +34,8 @@ code, such as removing temporary files, etc.}
provided by the <preview>-feature of a plugin.
\code{rk.get.preview.data} retrieves data previously stored with \code{rk.assign.preview.data}
\code{rk.discard.preview.data} discards data previously stored with \code{rk.assign.preview.data}.
- This gets called by the <preview>-box of the plugin, automtically,
- when the plugin dialog is closed.
- You do not generally have to call it manually. See the notes for running custom clearnup code,
- below.
+ This gets called by the <preview>-box of the plugin, automtically, when the plugin dialog is closed.
+ You do not generally have to call it manually. See the notes for running custom clearnup code, below.
}
\examples{
## To be generated in the preview() code section of a plugin
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.call.plugin.Rd b/rkward/rbackend/rpackages/rkward/man/rk.call.plugin.Rd
index c1dcb3bf..4e441155 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.call.plugin.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.call.plugin.Rd
@@ -58,8 +58,7 @@ x1 <- rnorm (100)
x2 <- rnorm (100, 2)
rk.call.plugin ("rkward::t_test_two_vars",
- confint.state="1", conflevel.real="0.95", hypothesis.string="greater", paired.state="0",
- varequal.state="0",
+ confint.state="1", conflevel.real="0.95", hypothesis.string="greater", paired.state="0", varequal.state="0",
x.available="x1", y.available="x2",
submit.mode="submit")
})
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.capture.output.Rd b/rkward/rbackend/rpackages/rkward/man/rk.capture.output.Rd
new file mode 100644
index 00000000..96f31313
--- /dev/null
+++ b/rkward/rbackend/rpackages/rkward/man/rk.capture.output.Rd
@@ -0,0 +1,29 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/rk.print-functions.R
+\name{rk.capture.output}
+\alias{rk.capture.output}
+\alias{rk.end.capture.output}
+\title{Capture output including system commands}
+\usage{
+rk.capture.output(capture.messages = TRUE, capture.output = TRUE,
+ suppress.messages = FALSE, suppress.output = FALSE)
+
+rk.end.capture.output(highlight = FALSE)
+}
+\arguments{
+\item{LANG}{language code to use. "C" for no translation, i.e. generally English}
+}
+\description{
+This feature records and / or redirects output similar to the \code{\link{sink}} and \code{\link{capture.output}}
+commands provided with R. Contrary to these two, \code{rk.capture.output} can also capture output generated by external
+programs running via \code{\link{system}} (on both Windows and Unix platforms). Further it allows to capture both
+warning messages and regular output to the same channel. Output can be passed on for printing, or suppressed,
+with the default being to print it.
+}
+\details{
+And arbitrary number of ouptut captures can be started and stopped, and these will form a push/pop stack.
+
+\code{rk.capture.output} Starts capturing output.
+
+\code{rk.end.capture.output} Stops capturing output, and returns the recorded output in a string.
+}
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.embed.device.Rd b/rkward/rbackend/rpackages/rkward/man/rk.embed.device.Rd
index 0ef12175..c023e49b 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.embed.device.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.embed.device.Rd
@@ -10,24 +10,17 @@ rk.embed.device(expr)
\item{expr}{Expression to evaluate.}
}
\description{
-\code{rk.embed.device} evaluates the given expression,
- and if this has created a window on the screen, tries to embed it as an RKWard window.
+\code{rk.embed.device} evaluates the given expression, and if this has created a window on the screen, tries to embed it as an RKWard window.
}
\details{
-Theoretically,
- \code{expr} can be any valid R expression. However typically this should be calls to X11(), Windows(), or, perhaps dev.copy().
- Importantly,
- the expression should create exactly one new window for \code{rk.embed.device()} to work. Keep in mind, that this is not
- always the case for \code{plot(...)} and similar commands,
- which will re-use an existing plot window, if available.
+Theoretically, \code{expr} can be any valid R expression. However typically this should be calls to X11(), Windows(), or, perhaps dev.copy().
+ Importantly, the expression should create exactly one new window for \code{rk.embed.device()} to work. Keep in mind, that this is not
+ always the case for \code{plot(...)} and similar commands, which will re-use an existing plot window, if available.
}
\note{
-\code{rk.embed.device()} will not work on all platforms (most importantly,
- not in most MacOSX binaries). Further, note that a captured
- \code{X11()} or \code{Windows} device may look similar to an \code{RK()} device,
- but is actually a very different thing. Capturing a
- window already "owned" by RKWard (importantly,
- \code{RK()} device windows) may lead to unexpected results, including crashes.
+\code{rk.embed.device()} will not work on all platforms (most importantly, not in most MacOSX binaries). Further, note that a captured
+ \code{X11()} or \code{Windows} device may look similar to an \code{RK()} device, but is actually a very different thing. Capturing a
+ window already "owned" by RKWard (importantly, \code{RK()} device windows) may lead to unexpected results, including crashes.
}
\examples{
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.get.tempfile.name.Rd b/rkward/rbackend/rpackages/rkward/man/rk.get.tempfile.name.Rd
index e5c46244..75e1014a 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.get.tempfile.name.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.get.tempfile.name.Rd
@@ -19,7 +19,8 @@ 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"))
+ style = c("regular", "preview"), css = getOption("rk.output.css.file"),
+ silent = FALSE)
rk.flush.output(x = rk.get.output.html.file(), flush.images = TRUE,
ask = TRUE, ...)
@@ -39,11 +40,12 @@ This could be scripts or additional CSS definitions, for example. Note that
\item{style}{Currently either "regular" or "preview". The latter omits table of contents and date.}
-\item{css}{Local file name of CSS file to use,
- or NULL for no CSS file. The CSS file will be
+\item{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.}
+\item{silent}{Set to true to avoid the output window being raised in the frontend.}
+
\item{ask}{Logical: Whether to ask before flushing the output file.}
\item{...}{Further parameters passed to rk.set.output.html.file()}
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.graph.on.Rd b/rkward/rbackend/rpackages/rkward/man/rk.graph.on.Rd
index dface1bf..1dc01bf8 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.graph.on.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.graph.on.Rd
@@ -13,8 +13,7 @@ rk.graph.on(device.type = getOption("rk.graphics.type"),
rk.graph.off()
}
\arguments{
-\item{device.type}{Type of device to create / graphics format to use. Currently,
- supported devices are "PNG", "SVG", or "JPG".
+\item{device.type}{Type of device to create / graphics format to use. Currently, supported devices are "PNG", "SVG", or "JPG".
The default is to use the format configured in Settings -> Configure RKWard -> Output.}
\item{width}{Width of graphics in pixels. The default is to use the width configured in Settings -> Configure RKWard -> Output.}
@@ -27,13 +26,11 @@ The default is to use the quality configured in Settings -> Configure RKWard ->
\item{...}{Further options will be passed to the graphics device used internally.
\bold{Warning}: It is advised to use \code{rk.graph.off} and \bold{not} \code{dev.off} to close the device opened by
-\code{rk.graph.on}. \code{dev.print(device = rk.graph.on)} is a \bold{wrong} usage for this "device,
- " and will result in errors.}
+\code{rk.graph.on}. \code{dev.print(device = rk.graph.on)} is a \bold{wrong} usage for this "device," and will result in errors.}
}
\description{
\code{rk.graph.on()} creates an R device that will plot to the output html page in RKWard (\url{rkward://page/rkward_output}).
-The default settings for \code{device.type}, \code{width}, \code{height},
- and \code{quality} can be modified from Settings -> Configure RKWard -> Output.
+The default settings for \code{device.type}, \code{width}, \code{height}, and \code{quality} can be modified from Settings -> Configure RKWard -> Output.
\code{rk.graph.off()} closes the device that was opened by \code{rk.graph.on}.
}
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.list.plugins.Rd b/rkward/rbackend/rpackages/rkward/man/rk.list.plugins.Rd
index b0c621a4..06aad83f 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.list.plugins.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.list.plugins.Rd
@@ -24,19 +24,15 @@ be accessible embedded into other plugins.}
\value{
\code{rk.list.plugins} returns a data.frame listing plugin ids, context, menu path
(tab-separated), and label of the plugin. If a plugin is available in more
- than one context,
- it will be listed several times. The exact layout (number and order of columns)
- of this data.frame might be subject to change. However,
- the \bold{names} of the columns in the
+ than one context, it will be listed several times. The exact layout (number and order of columns)
+ of this data.frame might be subject to change. However, the \bold{names} of the columns in the
returned data.frame are expected to remain stable.
\code{rk.set.plugin.status} returns \code{NULL}, invisibly
\bold{Note}: Each call to \code{rk.set.plugin.status} will result in a complete rebuild of the
menu (in the current implementation). While this should be hardly noticeable in interactive
- use, it could be an issue when changing the status of many plugins,
- programatically.
- In this case,
- make sure to do all changes in \bold{one} call to \code{rk.set.plugin.status},
+ use, it could be an issue when changing the status of many plugins, programatically.
+ In this case, make sure to do all changes in \bold{one} call to \code{rk.set.plugin.status},
rather than many separate calls.
}
\description{
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.load.pluginmaps.Rd b/rkward/rbackend/rpackages/rkward/man/rk.load.pluginmaps.Rd
index 34c3390a..5c6cd94e 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.load.pluginmaps.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.load.pluginmaps.Rd
@@ -15,17 +15,14 @@ if the only desired effect is to reload all active pluginmaps.}
been previously de-selected in the settings menu, and regardless of their
priority setting. In scripted usage, this should generally be set to FALSE.}
-\item{force.reload}{logical. By default the active pluginmaps are reloaded,
- only if any new ones
+\item{force.reload}{logical. By default the active pluginmaps are reloaded, only if any new ones
were added. If set to TRUE, pluginmaps are reloaded in any case. In
scripted usage, this should generally be set to FALSE. NOTE: Since
a reload always means reloading _all_ active pluginmaps, This may be
slow, and should be used with care.
-\bold{Note}: It is not necessary to reload the pluginmap,
- in order to refresh an individual
- plugin (e.g. after modifying the dialog),
- as plugins are not kept in memory after closing.
+\bold{Note}: It is not necessary to reload the pluginmap, in order to refresh an individual
+ plugin (e.g. after modifying the dialog), as plugins are not kept in memory after closing.
Any currently opened plugins are not affected by this function.}
}
\description{
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.old.packages.Rd b/rkward/rbackend/rpackages/rkward/man/rk.old.packages.Rd
index 09dbf097..0a8e9f58 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.old.packages.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.old.packages.Rd
@@ -16,8 +16,7 @@ a character vector of packages which are really old
For most purposes, this function is identical to old.packages(). However, if the same
package is installed to different locations, in different versions, old.packages() will
treat each of these installations separately. Thus, e.g. if lib.loc == c("A", "B") and
-package X is installed in B at an outdated version 0.1,
- but in A at the most recent version 0.2,
+package X is installed in B at an outdated version 0.1, but in A at the most recent version 0.2,
old.packages() will report package X at B as old. In contrast rk.old.packages() will recognize
that the current version is higher up in the path, and not report package X as old.
}
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.record.commands.Rd b/rkward/rbackend/rpackages/rkward/man/rk.record.commands.Rd
index 1171af6e..1423c1b8 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.record.commands.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.record.commands.Rd
@@ -9,8 +9,7 @@ rk.record.commands(filename, include.all = FALSE)
\arguments{
\item{filename}{filename to write to (file will be truncated!).}
-\item{include.all}{By default,
- some types of command are filtered (internal synchronisation commands, and run again links). Should these be included?}
+\item{include.all}{By default, some types of command are filtered (internal synchronisation commands, and run again links). Should these be included?}
}
\description{
To stop recording, supply NULL or "" as filename.
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.screen.device.Rd b/rkward/rbackend/rpackages/rkward/man/rk.screen.device.Rd
index 6982f661..3648cf85 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.screen.device.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.screen.device.Rd
@@ -7,8 +7,7 @@
rk.screen.device(...)
}
\description{
-Depending on your use case, you should use \code{dev.new()},
- \code{RK()} or \code{rk.embed.device()}, instead.
+Depending on your use case, you should use \code{dev.new()}, \code{RK()} or \code{rk.embed.device()}, instead.
}
\seealso{
\link{dev.new}, \link{RK}, \link{rk.embed.device}
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.show.messages.Rd b/rkward/rbackend/rpackages/rkward/man/rk.show.messages.Rd
index 99c20120..dfe3b036 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.show.messages.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.show.messages.Rd
@@ -103,8 +103,7 @@ if (rk.show.question ("Question:\\nDo you want to know about RKWard?",
button.yes = "Yes, I do!", button.no = "No, I don't care!", button.cancel = "")) {
rk.show.message ("Message:\\nRKWard is a KDE GUI for R.", "RKWard Info")
} else {
- rk.show.message ("You must be joking!", "RKWard Info",
- wait = FALSE) ## Run asynchronously
+ rk.show.message ("You must be joking!", "RKWard Info", wait = FALSE) ## Run asynchronously
}
## Selection lists:
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.switch.frontend.language.Rd b/rkward/rbackend/rpackages/rkward/man/rk.switch.frontend.language.Rd
index e6f471ab..00c84a94 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.switch.frontend.language.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.switch.frontend.language.Rd
@@ -13,13 +13,10 @@ rk.switch.frontend.language(LANG = "C")
This feature is mostly intended for the purpose of automated testing, which needs a
defined language to work. It might also be useful for translators, or e.g. to look up
some terms untranslated in special cases where you are more familiar with the English terms than
-your native language terms. Note that this will only strings that are translated after the call.,
- only those which get
-translated after the call. Most new dialogs you open,
- and importantly new plugin dialogs should
+your native language terms. Note that this will only strings that are translated after the call., only those which get
+translated after the call. Most new dialogs you open, and importantly new plugin dialogs should
show strings in the new lanuage, however.
}
\details{
-To change the language in the backend,
- use \code{Sys.setenv(LANGUAGE=...)} or \code{Sys.setlocale()}.
+To change the language in the backend, use \code{Sys.setenv(LANGUAGE=...)} or \code{Sys.setlocale()}.
}
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.with.window.hints.Rd b/rkward/rbackend/rpackages/rkward/man/rk.with.window.hints.Rd
index 0ec016cc..d8b78413 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.with.window.hints.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.with.window.hints.Rd
@@ -8,24 +8,18 @@
.rk.with.window.hints(expr, placement = "", name = "", style = "")
}
\arguments{
-\item{expr}{Expression to evaluate,
- unsually an expression that is expected to create exactly one
+\item{expr}{Expression to evaluate, unsually an expression that is expected to create exactly one
new window.}
-\item{placement}{a character string specifying either "attached" or "detached" placement,
- or
+\item{placement}{a character string specifying either "attached" or "detached" placement, or
(if left empty) the default placement for the type of window created.}
-\item{name}{character string specifing a named position. If a name is given,
- and this position is
-not yet known,
- the placement hint (see above) will be followed. If later a second window is
+\item{name}{character string specifing a named position. If a name is given, and this position is
+not yet known, the placement hint (see above) will be followed. If later a second window is
created with the same given name, it will replace the first window.}
-\item{style}{character string specifing a style hint. Currently,
- this can either be "preview" or
-"" (default),
- with most types of window not implementing any special behavior for "preview".}
+\item{style}{character string specifing a style hint. Currently, this can either be "preview" or
+"" (default), with most types of window not implementing any special behavior for "preview".}
}
\value{
\code{NULL}, invisibly.
@@ -34,8 +28,7 @@ created with the same given name, it will replace the first window.}
\code{.rk.with.window.hints} can be used to make windows appear in a specific
location: attached, detached, or in a named position where a previous window is
found. (The latter used for preview windows, importantly). It can also be used to pass
-"style" hints,
- importantly indicating that the window is a preview window. All specifications
+"style" hints, importantly indicating that the window is a preview window. All specifications
affect newly created windows, only, not existing ones.
}
\details{
More information about the rkward-tracker
mailing list