[education/rkward] rkward/rbackend/rpackages/rkward: more fixes to satisfy R CMD check

m.eik michalke null at kde.org
Wed Sep 13 21:46:51 BST 2023


Git commit 30098a62993896464ad9dc3fcc9646cc40173f76 by m.eik michalke.
Committed on 13/09/2023 at 22:46.
Pushed by meikm into branch 'master'.

more fixes to satisfy R CMD check

- mostly put examples in \dontrun{} as a plain R session outside of RKWard isn't able to proberly run most RKWard specific functions

in this state, the R package rkward survives R CMD check without errors for the first time :)

M  +15   -15   rkward/rbackend/rpackages/rkward/R/public_graphics.R
M  +3    -2    rkward/rbackend/rpackages/rkward/R/rk.KDE_GUI-functions.R
M  +2    -3    rkward/rbackend/rpackages/rkward/R/rk.demo.R
M  +16   -16   rkward/rbackend/rpackages/rkward/R/rk.edit-functions.R
M  +3    -4    rkward/rbackend/rpackages/rkward/R/rk.filename-functions.R
M  +4    -5    rkward/rbackend/rpackages/rkward/R/rk.output.R
M  +23   -29   rkward/rbackend/rpackages/rkward/R/rk.plugin-functions.R
M  +7    -6    rkward/rbackend/rpackages/rkward/R/rk.print-functions.R
M  +2    -4    rkward/rbackend/rpackages/rkward/R/rk.replace.function.R
M  +2    -2    rkward/rbackend/rpackages/rkward/R/rk.sessionInfo.R
M  +4    -4    rkward/rbackend/rpackages/rkward/R/rk.sync-functions.R
M  +5    -8    rkward/rbackend/rpackages/rkward/R/rk.workspace-functions.R
M  +2    -3    rkward/rbackend/rpackages/rkward/man/RK.Output.Rd
D  +0    -41   rkward/rbackend/rpackages/rkward/man/public.Rd
M  +4    -6    rkward/rbackend/rpackages/rkward/man/rk.assign.preview.data.Rd
M  +3    -3    rkward/rbackend/rpackages/rkward/man/rk.call.plugin.Rd
M  +5    -3    rkward/rbackend/rpackages/rkward/man/rk.capture.output.Rd
M  +2    -2    rkward/rbackend/rpackages/rkward/man/rk.demo.Rd
M  +8    -5    rkward/rbackend/rpackages/rkward/man/rk.edit.Rd
M  +2    -3    rkward/rbackend/rpackages/rkward/man/rk.embed.device.Rd
M  +2    -3    rkward/rbackend/rpackages/rkward/man/rk.get.tempfile.name.Rd
M  +2    -1    rkward/rbackend/rpackages/rkward/man/rk.graph.on.Rd
M  +2    -3    rkward/rbackend/rpackages/rkward/man/rk.list.plugins.Rd
M  +2    -5    rkward/rbackend/rpackages/rkward/man/rk.load.pluginmaps.Rd
M  +2    -3    rkward/rbackend/rpackages/rkward/man/rk.printer.device.Rd
M  +2    -5    rkward/rbackend/rpackages/rkward/man/rk.record.plot.Rd
M  +2    -4    rkward/rbackend/rpackages/rkward/man/rk.replace.function.Rd
M  +2    -1    rkward/rbackend/rpackages/rkward/man/rk.results.Rd
M  +2    -1    rkward/rbackend/rpackages/rkward/man/rk.sessionInfo.Rd
M  +2    -0    rkward/rbackend/rpackages/rkward/man/rk.show.messages.Rd
M  +2    -2    rkward/rbackend/rpackages/rkward/man/rk.sync.Rd
M  +2    -4    rkward/rbackend/rpackages/rkward/man/rk.with.window.hints.Rd
M  +0    -1    rkward/rbackend/rpackages/rkward/man/rk.workplace.Rd

https://invent.kde.org/education/rkward/-/commit/30098a62993896464ad9dc3fcc9646cc40173f76

diff --git a/rkward/rbackend/rpackages/rkward/R/public_graphics.R b/rkward/rbackend/rpackages/rkward/R/public_graphics.R
index cf2130adf..2eb5788cf 100644
--- a/rkward/rbackend/rpackages/rkward/R/public_graphics.R
+++ b/rkward/rbackend/rpackages/rkward/R/public_graphics.R
@@ -24,8 +24,15 @@
 #' @author Thomas Friedrichsmeier \email{rkward-devel@@kde.org}
 #' 
 #' @seealso \code{\link{rk.results}}, \code{\link{rk.print}}, \code{\link{rk.get.output.html.file}}, \code{\link[grDevices:dev.off]{dev.off}}, \code{\link[grDevices:svg]{svg}}, \code{\link[grDevices:png]{png}}, \code{\link[grDevices:jpeg]{jpeg}}
+#' @keywords devices
+#'
+#' @importFrom grDevices dev.cur png jpeg
+#' @export
+#' @aliases rk.graph.on rk.graph.off
+#' @rdname rk.graph.on
 #'
 #' @examples
+#' \dontrun{
 #' ## Plot directly to the output (html) file, by-passing screen device:
 #' rk.graph.on ("JPG", 480, 480, 75)
 #' plot (rnorm (100))
@@ -39,13 +46,7 @@
 #' ## WRONG USAGE: not run:
 #' #plot (rnorm (100))
 #' #dev.print (device = rk.graph.on)
-#'
-#' @keywords devices
-#'
-#' @importFrom grDevices dev.cur png jpeg
-#' @export
-#' @aliases rk.graph.on rk.graph.off
-#' @rdname rk.graph.on
+#' }
 "rk.graph.on" <- function (device.type=getOption ("rk.graphics.type"), width=getOption ("rk.graphics.width"), height=getOption ("rk.graphics.height"), quality, ...) 
 {
 	make.url <- function (filename) {
@@ -162,14 +163,14 @@
 #'       window already "owned" by RKWard (importantly, \code{RK()} device windows) may lead to unexpected results, including crashes.
 #'
 #' @seealso \link{RK}
+#' @importFrom grDevices dev.cur
+#' @export
+#'
 #' @examples
-#' 
-#' ## Not run:
+#' \dontrun{
 #' rk.embed.device (grDevices::X11(title="X11 device window"))
 #' plot (rnorm (10))
-#'
-#' @importFrom grDevices dev.cur
-#' @export
+#' }
 "rk.embed.device" <- function (expr) {
 	oldd <- dev.cur ()
 	.rk.do.call ("startOpenX11", as.character (oldd));
@@ -275,11 +276,10 @@
 #' @export
 #' @importFrom grDevices dev.cur postscript
 #' @examples
-#' 
-#' ## Not run:
+#' \dontrun{
 #' plot (rnorm (10))
 #' dev.print (rk.printer.device)
-#' 
+#' }
 # Produces a temporary postscript file and opens a print dialog for it
 # Parameters are passed to postscript(), but typically this is simply used as
 #   dev.print(rk.print.preview)
diff --git a/rkward/rbackend/rpackages/rkward/R/rk.KDE_GUI-functions.R b/rkward/rbackend/rpackages/rkward/R/rk.KDE_GUI-functions.R
index f734e625e..af173b0b0 100755
--- a/rkward/rbackend/rpackages/rkward/R/rk.KDE_GUI-functions.R
+++ b/rkward/rbackend/rpackages/rkward/R/rk.KDE_GUI-functions.R
@@ -79,7 +79,9 @@
 #'    \code{\link[base:file.choose]{file.choose}}
 #' @keywords utilities
 #' @rdname rk.show.messages
+#' @export
 #' @examples
+#' \dontrun{
 #' ## Message boxes
 #' 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 = "")) {
@@ -93,8 +95,7 @@
 #'   multiple = TRUE, title = "vowels")
 #' .rk.backups$select.list (LETTERS, preselect = c("A", "E", "I", "O", "U"), 
 #'   multiple = TRUE, title = "vowels")
-
-#' @export
+#' }
 "rk.show.message" <- function (message, caption = gettext("Information"), wait=TRUE) {
 	.Call ("rk.dialog", caption, message, "ok", "", "", "ok", isTRUE (wait), PACKAGE="(embedding)")
 	invisible (TRUE)
diff --git a/rkward/rbackend/rpackages/rkward/R/rk.demo.R b/rkward/rbackend/rpackages/rkward/R/rk.demo.R
index d3b3a813a..bca94bafa 100644
--- a/rkward/rbackend/rpackages/rkward/R/rk.demo.R
+++ b/rkward/rbackend/rpackages/rkward/R/rk.demo.R
@@ -20,10 +20,9 @@
 #' @rdname rk.demo
 #' @export
 #' @examples
-#' 
-#' ## Not run
+#' \dontrun{
 #' rk.demo("graphics")
-
+#' }
 "rk.demo" <- function (topic, package, lib.loc=NULL) {
 	# for the time being, translate NULL into missingness and throw a warning
 	if(!missing(package)){
diff --git a/rkward/rbackend/rpackages/rkward/R/rk.edit-functions.R b/rkward/rbackend/rpackages/rkward/R/rk.edit-functions.R
index 3e183f998..cff0e1b5e 100644
--- a/rkward/rbackend/rpackages/rkward/R/rk.edit-functions.R
+++ b/rkward/rbackend/rpackages/rkward/R/rk.edit-functions.R
@@ -17,19 +17,8 @@
 #' by default, when run inside an RKWard session. (via \code{getOption("editor")},
 #' and \code{getOption("browser")}.
 #' 
-#' @aliases rk.edit rk.edit.files rk.show.files rk.show.html
 #' @param x an object to edit.
-#' @param name name of the environment to use (optional).
-#' @param file character vector, filenames to show or edit.
-#' @param title character vector, of the same length as \code{file}; This can
-#'   be used to give descriptive titles to each file, which will be displayed
-#'   to the user.
-#' @param wtitle character vector, of length 1. This will be used as the window
-#'   title.
-#' @param prompt logical of length 1. If TRUE (the default) a prompt is dialog
-#'   is shown along with the files to show / edit.
-#' @param delete a logical (not NA), when \code{TRUE} the shown file(s) are
-#'   deleted after closing.
+#' @aliases rk.edit rk.edit.files rk.show.files rk.show.html
 #' @return All functions described on this page return \code{NULL},
 #'   unconditionally.
 #' @author Thomas Friedrichsmeier \email{rkward-devel@@kde.org}
@@ -37,18 +26,24 @@
 #'   \code{\link{file.show}}, \code{\link{browseURL}}
 #' @keywords utilities IO
 #' @rdname rk.edit
+#' @export
 #' @examples
-#' 
-#' ## Not run
+#' \dontrun{
 #' x <- data.frame (a=c(1:3), b=c(2:4))
 #' rk.edit(x)
-
-#' @export
+#' }
 "rk.edit" <- function (x) {
 	object <- deparse (substitute (x))
 	.rk.do.call ("edit", object)
 }
 
+#' @param name name of the environment to use (optional).
+#' @param file character vector, filenames to show or edit.
+#' @param title character vector, of the same length as \code{file}; This can
+#'   be used to give descriptive titles to each file, which will be displayed
+#'   to the user.
+#' @param prompt logical of length 1. If TRUE (the default) a prompt is dialog
+#'   is shown along with the files to show / edit.
 #' @export
 #' @rdname rk.edit
 "rk.edit.files" <- function (name, file="", title, prompt = TRUE) {
@@ -74,6 +69,10 @@
 	invisible (.Call ("rk.edit.files", as.character (file), as.character (title), as.character (name), isTRUE (prompt), PACKAGE="(embedding)"))
 }
 
+#' @param header character, header to show.
+#' @param delete.file a logical (not NA), when \code{TRUE} the shown file(s) are
+#'   deleted after closing.
+#' @param delete logical, for compatibility with earlier versions of R.
 #' @export
 #' @rdname rk.edit
 "rk.show.files" <- function (file = file, header = file, title, delete.file=FALSE, prompt = TRUE,
@@ -91,6 +90,7 @@
 	invisible (.Call ("rk.show.files", as.character (file), as.character (header), as.character (title), delete, isTRUE (prompt), PACKAGE="(embedding)"))
 }
 
+#' @param url a URL to show.
 #' @export
 #' @rdname rk.edit
 "rk.show.html" <- function (url) {
diff --git a/rkward/rbackend/rpackages/rkward/R/rk.filename-functions.R b/rkward/rbackend/rpackages/rkward/R/rk.filename-functions.R
index ef3d69f4c..39cc0821d 100644
--- a/rkward/rbackend/rpackages/rkward/R/rk.filename-functions.R
+++ b/rkward/rbackend/rpackages/rkward/R/rk.filename-functions.R
@@ -66,8 +66,9 @@
 #'   \link{rk.print}
 #' @keywords utilities IO
 #' @rdname rk.get.tempfile.name
+#' @export
 #' @examples
-#' 
+#' \dontrun{
 #' testfile.name <- rk.get.tempfile.name(prefix="test", extension=".txt")
 #' testfile <- file(testfile.name)
 #' cat("This is a test\n", file=testfile)
@@ -76,14 +77,12 @@
 #' 
 #' 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)
-#' 
-#' @export
+#' }
 "rk.get.tempfile.name" <- function (prefix="image", extension=".jpg", directory=dirname (rk.get.output.html.file ())) {
 	x <- .rk.do.simple.call ("unused.filename", c (prefix, extension, directory))
 	ret <- x[2]
diff --git a/rkward/rbackend/rpackages/rkward/R/rk.output.R b/rkward/rbackend/rpackages/rkward/R/rk.output.R
index 5634f3118..0ca2fd2b3 100644
--- a/rkward/rbackend/rpackages/rkward/R/rk.output.R
+++ b/rkward/rbackend/rpackages/rkward/R/rk.output.R
@@ -46,19 +46,18 @@
 #'
 #' @returns NULL
 #' @field id An internal identifier. NULL for a closed output. This should be treated as read-only, but you can use this to test whether two output handles are the same.
+#' @import methods
+#' @exportClass RK.Output
 #'
 #' @examples
-#'
-#' ## Not run
+#' \dontrun{
 #' x <- rk.output(create=TRUE)
 #' x$activate()
 #' rk.print("Hello World!")
 #' x$view()
 #' x$save() # Will prompt for filename
 #' x$close()
-#'
-#' @import methods
-#' @exportClass RK.Output
+#' }
 RK.Output <- setRefClass(Class="RK.Output", fields=list(id="character"),
 	methods=list(
 	# The implementation of most of these is not terribly complex, but we need an implementation in the frontend, anyway, so we use that.
diff --git a/rkward/rbackend/rpackages/rkward/R/rk.plugin-functions.R b/rkward/rbackend/rpackages/rkward/R/rk.plugin-functions.R
index e2a723908..420bbd7d1 100644
--- a/rkward/rbackend/rpackages/rkward/R/rk.plugin-functions.R
+++ b/rkward/rbackend/rpackages/rkward/R/rk.plugin-functions.R
@@ -43,22 +43,23 @@
 #' @author Thomas Friedrichsmeier \email{rkward-devel@@kde.org}
 #' @seealso \code{\link{rk.results}}, \url{rkward://page/rkward_output}
 #' @keywords utilities
+#' @export
+#' @rdname rk.call.plugin
+#'
 #' @examples
-#' 
+#'
 #' ## "t_test_two_vars" plugin:
 #' ## see the output: Windows->Show Output
+#' \dontrun{
 #' local({
 #' x1 <- rnorm (100)
 #' x2 <- rnorm (100, 2)
-#' 
-#' rk.call.plugin ("rkward::t_test_two_vars", 
+#' rk.call.plugin ("rkward::t_test_two_vars",
 #'   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")
 #' })
-#'
-#' @export
-#' @rdname rk.call.plugin
+#' }
 "rk.call.plugin" <- function (plugin, ..., submit.mode = c ("manual", "auto", "submit")) {
 	# prepare arguments
 	settings <- list (...)
@@ -100,17 +101,14 @@
 #' @author Thomas Friedrichsmeier \email{rkward-devel@@kde.org}
 #' @seealso \code{\link{rk.call.plugin}}, \code{\link[rkwarddev:rk.plugin.skeleton]{rk.plugin.skeleton}}
 #' @keywords utilities
+#' @rdname rk.load.pluginmaps
+#' @export
 #'
 #' @examples
-#' 
-#' ## NOT RUN
-#'
+#' \dontrun{
 #' ## reload all active pluginmaps
 #' rk.load.pluginmaps()
-#'
-#' ## END NOT RUN
-#' @export
-#' @rdname rk.load.pluginmaps
+#' }
 "rk.load.pluginmaps" <- function (pluginmap.files, force.add = TRUE, force.reload = TRUE) {
 	# for the time being, translate NULL into missingness and throw a warning
 	if(!missing(pluginmap.files)){
@@ -153,21 +151,19 @@
 #'
 #' @author Thomas Friedrichsmeier \email{rkward-devel@@kde.org}
 #' @keywords utilities
-#'
 #' @seealso \code{\link{rk.call.plugin}} for invoking a plugin, programatically
+#' @rdname rk.list.plugins
+#' @aliases rk.list.plugins rk.set.plugin.status
+#' @export
 #'
 #' @examples
+#' \dontrun{
 #' ## list all current plugins
 #' rk.list.plugins ()
 #'
-#' ## NOT RUN
 #' ## hide t.test plugin
 #' rk.set.plugin.status ("rkward::t_test", visible=FALSE)
-#' ## END NOT RUN
-#'
-#' @export
-#' @rdname rk.list.plugins
-#' @aliases rk.list.plugins rk.set.plugin.status
+#' }
 "rk.list.plugins" <- function () {
 	plugs <- .rk.do.plain.call("listPlugins")
 	columns = c ("ID", "Context", "Menupath", "Label")
@@ -195,8 +191,8 @@ assign(".rk.preview.data", list (), envir=.rk.variables)
 #'    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.
 #'
-#' @param id (character). Id associated with the data. Usually this will be the 'id' value of the <preview>-box.
-#' @param value. The value to assign. If this is a list, and contains a function named "on.delete", this function
+#' @param id character, ID associated with the data. Usually this will be the 'id' value of the <preview>-box.
+#' @param 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.
 #'
@@ -209,11 +205,13 @@ assign(".rk.preview.data", list (), envir=.rk.variables)
 #'
 #' @author Thomas Friedrichsmeier \email{rkward-devel@@kde.org}
 #' @keywords utilities
+#' @rdname rk.assign.preview.data
+#' @aliases rk.get.preview.data .rk.discard.preview.data
+#' @export
 #'
 #' @examples
 #' ## To be generated in the preview() code section of a plugin
-#'
-#' ## NOT RUN
+#' \dontrun{
 #' pdata <- rk.get.preview.data("SOMEID")
 #' if (is.null (pdata)) {
 #'   outfile <- rk.get.tempfile.name(prefix="preview", extension=".txt", directory=rk.tempdir ())
@@ -226,11 +224,7 @@ assign(".rk.preview.data", list (), envir=.rk.variables)
 #'   cat ("This is a test", pdata$filename)
 #'   rk.edit.files(file=pdata$filename)
 #' })
-#' ## END NOT RUN
-#'
-#' @export
-#' @rdname rk.assign.preview.data
-#' @aliases rk.get.preview.data .rk.discard.preview.data
+#' }
 "rk.assign.preview.data" <- function (id, value=list ()) {
 	pdata <- .rk.variables$.rk.preview.data
 	pdata[[id]] <- value
diff --git a/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R b/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R
index c0b8f079f..577876a71 100644
--- a/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R
+++ b/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R
@@ -59,8 +59,10 @@
 #'   \url{rkward://page/rkward_output}
 #' @keywords utilities
 #' @rdname rk.results
+#' @importFrom grDevices dev.cur
+#' @export
 #' @examples
-#' 
+#' \dontrun{
 #' # code is only run when the R2HTML package can be loaded
 #' if(require("R2HTML", quietly = TRUE)){
 #' 
@@ -93,8 +95,7 @@
 #'     'confidence interval of difference'=result$conf.int ))
 #'   })
 #' } else {}
-#' @importFrom grDevices dev.cur
-#' @export
+#' }
 "rk.print" <- function(x,...) {
 	if (inherits (x, "htmlwidget")) {
 		requireNamespace ("htmlwidgets", quietly = TRUE)
@@ -280,7 +281,9 @@
 #'
 #' And arbitrary number of ouptut captures can be started and stopped, and these will form a push/pop stack.
 #'
-#' @param suppress.messages message are not sent on, neither to surrounding captures, nor as regular output.
+#' @param capture.messages logical, whether messages should be captured.
+#' @param capture.output logical, whether output should be captured.
+#' @param suppress.messages logical, if \code{FALSE} message are not sent on, neither to surrounding captures, nor as regular output.
 #' @param suppress.output like \code{suppress.messages}, but for output.
 #' @param allow.nesting if false, output / message is not sent to surrounding captures, but is sent to regular output (unless suppressed)
 #'
@@ -288,8 +291,6 @@
 #' 
 #' \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, allow.nesting = TRUE) {
diff --git a/rkward/rbackend/rpackages/rkward/R/rk.replace.function.R b/rkward/rbackend/rpackages/rkward/R/rk.replace.function.R
index 0c5529110..2fc50a239 100644
--- a/rkward/rbackend/rpackages/rkward/R/rk.replace.function.R
+++ b/rkward/rbackend/rpackages/rkward/R/rk.replace.function.R
@@ -33,15 +33,13 @@
 #' @export
 #' @rdname rk.replace.function
 #' @examples
-#' 
-#' ## Not run
+#' \dontrun{
 #' rk.replace.function ("history", as.environment ("package:utils"),
 #'   function () {
 #'     cat ("This is what you typed:\n")
 #'     eval (body (.rk.backups$history))
 #'   })
-#' ## End not run
-#' 
+#' }
 
 # Tries to replace a function inside its environemnt/namespace.
 # Function formals are copied from the original.
diff --git a/rkward/rbackend/rpackages/rkward/R/rk.sessionInfo.R b/rkward/rbackend/rpackages/rkward/R/rk.sessionInfo.R
index c65a3bb14..8a03f0871 100644
--- a/rkward/rbackend/rpackages/rkward/R/rk.sessionInfo.R
+++ b/rkward/rbackend/rpackages/rkward/R/rk.sessionInfo.R
@@ -20,9 +20,9 @@
 #' @export
 #' @rdname rk.sessionInfo
 #' @examples
-#' 
+#' \dontrun{
 #' rk.sessionInfo()
-
+#' }
 "rk.sessionInfo" <- function () {
 	cat (.rk.do.plain.call ("getSessionInfo"), sep="\n")
 	cat ("R runtime session info:\n")
diff --git a/rkward/rbackend/rpackages/rkward/R/rk.sync-functions.R b/rkward/rbackend/rpackages/rkward/R/rk.sync-functions.R
index 0e5d37c2b..1ddaac751 100644
--- a/rkward/rbackend/rpackages/rkward/R/rk.sync-functions.R
+++ b/rkward/rbackend/rpackages/rkward/R/rk.sync-functions.R
@@ -25,12 +25,12 @@
 #' @seealso \url{rkward://page/rkward_workspace_browser}
 #' @keywords utilities misc
 #' @rdname rk.sync
-#' @examples
-#' 
-#' rk.sync (rkward::rk.record.plot)
-#' 
 # should this really be public?
 #' @export
+#' @examples
+#' \dontrun{
+#' rk.sync (rkward::rk.record.plot)
+#' }
 "rk.sync" <- function (x) {
 	object <- deparse (substitute (x))
 	.rk.do.call("sync", list(NULL, NULL, object))
diff --git a/rkward/rbackend/rpackages/rkward/R/rk.workspace-functions.R b/rkward/rbackend/rpackages/rkward/R/rk.workspace-functions.R
index 9524875a3..50b9e6860 100644
--- a/rkward/rbackend/rpackages/rkward/R/rk.workspace-functions.R
+++ b/rkward/rbackend/rpackages/rkward/R/rk.workspace-functions.R
@@ -31,14 +31,13 @@
 #' @seealso \url{rkward://page/rkward_for_r_users}, \link{rk.get.workspace.url}
 #' @keywords utilities
 #' @rdname rk.workplace
+#' @importFrom utils URLdecode
+#' @export
 #' @examples
 #' \dontrun{
 #' rk.save.workplace ()
 #' rk.restore.workplace ()
 #' }
-#' 
-#' @importFrom utils URLdecode
-#' @export
 "rk.save.workplace" <- function (file, description) {
 	# for the time being, translate NULL into missingness and throw a warning
 	if(!missing(file)){
@@ -120,16 +119,14 @@
 #' @author Thomas Friedrichsmeier \email{rkward-devel@@kde.org}
 #' @keywords utilities
 #' @rdname rk.with.window.hints
+#' @export
 #' @examples
-#' 
-#' ## Not run
+#' \dontrun{
 #' .rk.with.window.hints ({
 #'    RK ()
 #'    plot (1, 1)
 #' }, "attached")
-#' ## End not run
-#' 
-#' @export
+#' }
 ".rk.with.window.hints" <- function (expr, placement="", name="", style="") {
 	.rk.do.plain.call ("set.window.placement.hint", as.character (c (placement, name, style)), FALSE)
 	on.exit (.rk.do.plain.call ("set.window.placement.hint", c ("", "", ""), FALSE))
diff --git a/rkward/rbackend/rpackages/rkward/man/RK.Output.Rd b/rkward/rbackend/rpackages/rkward/man/RK.Output.Rd
index 389fc833c..62bb4eec2 100644
--- a/rkward/rbackend/rpackages/rkward/man/RK.Output.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/RK.Output.Rd
@@ -90,13 +90,12 @@ Do not write anything to the target filename, directly! This is purely for infor
 }}
 
 \examples{
-
-## Not run
+\dontrun{
 x <- rk.output(create=TRUE)
 x$activate()
 rk.print("Hello World!")
 x$view()
 x$save() # Will prompt for filename
 x$close()
-
+}
 }
diff --git a/rkward/rbackend/rpackages/rkward/man/public.Rd b/rkward/rbackend/rpackages/rkward/man/public.Rd
deleted file mode 100644
index 6a5f08b2a..000000000
--- a/rkward/rbackend/rpackages/rkward/man/public.Rd
+++ /dev/null
@@ -1,41 +0,0 @@
-\name{test}
-\alias{test}
-%- Also NEED an '\alias' for EACH other topic documented here.
-\title{ ~~function to do ... ~~ }
-\description{
-  ~~ A concise (1-5 lines) description of what the function does. ~~
-}
-\usage{
-test(x)
-}
-%- maybe also 'usage' for other objects documented here.
-\arguments{
-  \item{x}{ ~~Describe \code{x} here~~ }
-}
-\details{
-  ~~ If necessary, more details than the __description__  above ~~
-}
-\value{
-  ~Describe the value returned
-  If it is a LIST, use
-  \item{comp1 }{Description of 'comp1'}
-  \item{comp2 }{Description of 'comp2'}
-  ...
-}
-\references{ ~put references to the literature/web site here ~ }
-\author{ ~~who you are~~ }
-\note{ ~~further notes~~ }
-
-%- ~Make other sections like Warning with \section{Warning }{....} ~
-
-%- \seealso{ ~~objects to See Also as \code{\link{~~fun~~}}, ~~~ }
-\examples{
-##---- Should be DIRECTLY executable !! ----
-##-- ==>  Define data, use random,
-##--	or do  help(data=index)  for the standard data sets.
-
-## The function is currently defined as
-function (x) { x }
-}
-\keyword{ ~kwd1 }% at least one, from doc/KEYWORDS
-\keyword{ ~kwd2 }% __ONLY ONE__ keyword per line
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 03529f8ac..e09b2c135 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.assign.preview.data.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.assign.preview.data.Rd
@@ -14,9 +14,9 @@ rk.get.preview.data(id)
 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{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.}
 }
@@ -38,8 +38,7 @@ code, such as removing temporary files, etc.}
 }
 \examples{
 ## To be generated in the preview() code section of a plugin
-
-## NOT RUN
+\dontrun{
 pdata <- rk.get.preview.data("SOMEID")
 if (is.null (pdata)) {
   outfile <- rk.get.tempfile.name(prefix="preview", extension=".txt", directory=rk.tempdir ())
@@ -52,8 +51,7 @@ try ({
   cat ("This is a test", pdata$filename)
   rk.edit.files(file=pdata$filename)
 })
-## END NOT RUN
-
+}
 }
 \author{
 Thomas Friedrichsmeier \email{rkward-devel at kde.org}
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.call.plugin.Rd b/rkward/rbackend/rpackages/rkward/man/rk.call.plugin.Rd
index 4e4411555..601ab03f0 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.call.plugin.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.call.plugin.Rd
@@ -53,16 +53,16 @@ not available to the plugin.
 
 ## "t_test_two_vars" plugin:
 ## see the output: Windows->Show Output
+\dontrun{
 local({
 x1 <- rnorm (100)
 x2 <- rnorm (100, 2)
-
-rk.call.plugin ("rkward::t_test_two_vars", 
+rk.call.plugin ("rkward::t_test_two_vars",
   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")
 })
-
+}
 }
 \seealso{
 \code{\link{rk.results}}, \url{rkward://page/rkward_output}
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.capture.output.Rd b/rkward/rbackend/rpackages/rkward/man/rk.capture.output.Rd
index 73d0a3518..0c8a74b8e 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.capture.output.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.capture.output.Rd
@@ -16,7 +16,11 @@ rk.capture.output(
 rk.end.capture.output(highlight = FALSE)
 }
 \arguments{
-\item{suppress.messages}{message are not sent on, neither to surrounding captures, nor as regular output.}
+\item{capture.messages}{logical, whether messages should be captured.}
+
+\item{capture.output}{logical, whether output should be captured.}
+
+\item{suppress.messages}{logical, if \code{FALSE} message are not sent on, neither to surrounding captures, nor as regular output.}
 
 \item{suppress.output}{like \code{suppress.messages}, but for output.}
 
@@ -25,8 +29,6 @@ rk.end.capture.output(highlight = FALSE)
 \code{rk.capture.output} Starts capturing output.
 
 \code{rk.end.capture.output} Stops capturing output, and returns the recorded output in a string.}
-
-\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}}
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.demo.Rd b/rkward/rbackend/rpackages/rkward/man/rk.demo.Rd
index c540ea64c..0154fa7e0 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.demo.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.demo.Rd
@@ -23,10 +23,10 @@ script for editing, instead of sourcing it. Contrary to \code{\link{demo}},
 the specification of a topic is mandatory.
 }
 \examples{
-
-## Not run
+\dontrun{
 rk.demo("graphics")
 }
+}
 \seealso{
 \code{\link{rk.edit.files}}, \code{\link{rk.show.files}},
   \code{\link{demo}}
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.edit.Rd b/rkward/rbackend/rpackages/rkward/man/rk.edit.Rd
index e59e66aea..392c02454 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.edit.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.edit.Rd
@@ -36,11 +36,14 @@ to the user.}
 \item{prompt}{logical of length 1. If TRUE (the default) a prompt is dialog
 is shown along with the files to show / edit.}
 
-\item{delete}{a logical (not NA), when \code{TRUE} the shown file(s) are
+\item{header}{character, header to show.}
+
+\item{delete.file}{a logical (not NA), when \code{TRUE} the shown file(s) are
 deleted after closing.}
 
-\item{wtitle}{character vector, of length 1. This will be used as the window
-title.}
+\item{delete}{logical, for compatibility with earlier versions of R.}
+
+\item{url}{a URL to show.}
 }
 \value{
 All functions described on this page return \code{NULL},
@@ -62,11 +65,11 @@ by default, when run inside an RKWard session. (via \code{getOption("editor")},
 and \code{getOption("browser")}.
 }
 \examples{
-
-## Not run
+\dontrun{
 x <- data.frame (a=c(1:3), b=c(2:4))
 rk.edit(x)
 }
+}
 \seealso{
 \code{\link{edit}}, \code{\link{file.edit}},
   \code{\link{file.show}}, \code{\link{browseURL}}
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.embed.device.Rd b/rkward/rbackend/rpackages/rkward/man/rk.embed.device.Rd
index c023e49b6..4293e9c5d 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.embed.device.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.embed.device.Rd
@@ -23,11 +23,10 @@ Theoretically, \code{expr} can be any valid R expression. However typically this
       window already "owned" by RKWard (importantly, \code{RK()} device windows) may lead to unexpected results, including crashes.
 }
 \examples{
-
-## Not run:
+\dontrun{
 rk.embed.device (grDevices::X11(title="X11 device window"))
 plot (rnorm (10))
-
+}
 }
 \seealso{
 \link{RK}
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 8fe937e37..6b0d33b89 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.get.tempfile.name.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.get.tempfile.name.Rd
@@ -110,7 +110,7 @@ via the RKWard GUI.
 \link{R.home}.
 }
 \examples{
-
+\dontrun{
 testfile.name <- rk.get.tempfile.name(prefix="test", extension=".txt")
 testfile <- file(testfile.name)
 cat("This is a test\n", file=testfile)
@@ -119,13 +119,12 @@ 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)
-
+}
 }
 \seealso{
 \url{rkward://page/rkward_output}, \link{tempfile}, \link{file},
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.graph.on.Rd b/rkward/rbackend/rpackages/rkward/man/rk.graph.on.Rd
index b965ef9b6..252fe7816 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.graph.on.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.graph.on.Rd
@@ -36,6 +36,7 @@ The default is to use the quality configured in Settings -> Configure RKWard ->
 The default settings for \code{device.type}, \code{width}, \code{height}, and \code{quality} can be modified from Settings -> Configure RKWard -> Output.
 }
 \examples{
+\dontrun{
 ## Plot directly to the output (html) file, by-passing screen device:
 rk.graph.on ("JPG", 480, 480, 75)
 plot (rnorm (100))
@@ -49,7 +50,7 @@ rk.graph.off ()
 ## WRONG USAGE: not run:
 #plot (rnorm (100))
 #dev.print (device = rk.graph.on)
-
+}
 }
 \seealso{
 \code{\link{rk.results}}, \code{\link{rk.print}}, \code{\link{rk.get.output.html.file}}, \code{\link[grDevices:dev.off]{dev.off}}, \code{\link[grDevices:svg]{svg}}, \code{\link[grDevices:png]{png}}, \code{\link[grDevices:jpeg]{jpeg}}
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.list.plugins.Rd b/rkward/rbackend/rpackages/rkward/man/rk.list.plugins.Rd
index 877c32bb0..e05130df0 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.list.plugins.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.list.plugins.Rd
@@ -41,14 +41,13 @@ registered plugins (in loaded pluginmaps).
    only visibility can be controlled.
 }
 \examples{
+\dontrun{
 ## list all current plugins
 rk.list.plugins ()
 
-## NOT RUN
 ## hide t.test plugin
 rk.set.plugin.status ("rkward::t_test", visible=FALSE)
-## END NOT RUN
-
+}
 }
 \seealso{
 \code{\link{rk.call.plugin}} for invoking a plugin, programatically
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.load.pluginmaps.Rd b/rkward/rbackend/rpackages/rkward/man/rk.load.pluginmaps.Rd
index d50da04da..261309193 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.load.pluginmaps.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.load.pluginmaps.Rd
@@ -28,13 +28,10 @@ priority setting. In scripted usage, this should generally be set to FALSE.}
 (Re-)load the given pluginmap files into the RKWard GUI
 }
 \examples{
-
-## NOT RUN
-
+\dontrun{
 ## reload all active pluginmaps
 rk.load.pluginmaps()
-
-## END NOT RUN
+}
 }
 \seealso{
 \code{\link{rk.call.plugin}}, \code{\link[rkwarddev:rk.plugin.skeleton]{rk.plugin.skeleton}}
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.printer.device.Rd b/rkward/rbackend/rpackages/rkward/man/rk.printer.device.Rd
index 7128999ed..abf137146 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.printer.device.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.printer.device.Rd
@@ -22,11 +22,10 @@ Typically this device is used with \code{\link{dev.print}}, as shown in the
 example, below.
 }
 \examples{
-
-## Not run:
+\dontrun{
 plot (rnorm (10))
 dev.print (rk.printer.device)
-
+}
 }
 \seealso{
 \code{\link{postscript}}, \code{\link{dev.print}},
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.record.plot.Rd b/rkward/rbackend/rpackages/rkward/man/rk.record.plot.Rd
index 96b03bd97..58b87423e 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.record.plot.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.record.plot.Rd
@@ -97,9 +97,7 @@ rk.duplicate.device(devId = dev.cur())
 }
 
 \examples{
-## Example for this?
-require (rkward)
-
+\dontrun{
 .L. <- getOption ("rk.graphics.hist.max.length")
 
 local ({
@@ -116,10 +114,9 @@ local ({
 rk.first.plot ()
 for (i in 1:(rk.record.plot$sP.length-1)) rk.next.plot ()
 
-## Not run
 rk.clear.plot.history ()
 options ("rk.graphics.hist.max.length" = .L.)
-
+}
 }
 \keyword{device}
 \keyword{dynamic}
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.replace.function.Rd b/rkward/rbackend/rpackages/rkward/man/rk.replace.function.Rd
index 73244d79c..dbf1fb181 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.replace.function.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.replace.function.Rd
@@ -44,15 +44,13 @@ functions in arbitrary ways. You better know what you are doing.
 \bold{WARNING}: Does not work well on generics!
 }
 \examples{
-
-## Not run
+\dontrun{
 rk.replace.function ("history", as.environment ("package:utils"),
   function () {
     cat ("This is what you typed:\n")
     eval (body (.rk.backups$history))
   })
-## End not run
-
+}
 }
 \seealso{
 \code{\link{assignInNamespace}}, \code{\link{debug}}
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.results.Rd b/rkward/rbackend/rpackages/rkward/man/rk.results.Rd
index 47b19a262..9b86fe748 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.results.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.results.Rd
@@ -82,7 +82,7 @@ a \code{htest}. This is similar to \code{stats:::print.htext} and makes
 sense only when \code{x$alternatives} exists.
 }
 \examples{
-
+\dontrun{
 # code is only run when the R2HTML package can be loaded
 if(require("R2HTML", quietly = TRUE)){
 
@@ -116,6 +116,7 @@ if(require("R2HTML", quietly = TRUE)){
   })
 } else {}
 }
+}
 \seealso{
 \code{\link[R2HTML:HTML]{HTML}}, \code{\link{rk.get.output.html.file}},
   \code{\link{rk.get.description}}, \code{\link{rk.call.plugin}},
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.sessionInfo.Rd b/rkward/rbackend/rpackages/rkward/man/rk.sessionInfo.Rd
index 28f3711fa..a273f10bf 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.sessionInfo.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.sessionInfo.Rd
@@ -20,9 +20,10 @@ Typically, when reporting a bug, you should use \code{Help->Report Bug...}
 from the menu. Internally, this will call \code{rk.sessionInfo()}.
 }
 \examples{
-
+\dontrun{
 rk.sessionInfo()
 }
+}
 \seealso{
 \code{\link{sessionInfo}}
 }
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.show.messages.Rd b/rkward/rbackend/rpackages/rkward/man/rk.show.messages.Rd
index 596dd9e66..c9f25c4f8 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.show.messages.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.show.messages.Rd
@@ -138,6 +138,7 @@ they expect. In those cases, the name of the target directory must be entered in
 input field of the dialog manually.
 }
 \examples{
+\dontrun{
 ## Message boxes
 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 = "")) {
@@ -152,6 +153,7 @@ rk.select.list (LETTERS, preselect = c("A", "E", "I", "O", "U"),
 .rk.backups$select.list (LETTERS, preselect = c("A", "E", "I", "O", "U"), 
   multiple = TRUE, title = "vowels")
 }
+}
 \seealso{
 \code{\link{system}}, \code{\link{select.list}},
    \code{\link[base:file.choose]{file.choose}}
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.sync.Rd b/rkward/rbackend/rpackages/rkward/man/rk.sync.Rd
index 50ecfc8c4..102ab04ef 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.sync.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.sync.Rd
@@ -32,9 +32,9 @@ of objects. rk.sync() can be used, here, to inspect the objects inside
 environments (see examples).
 }
 \examples{
-
+\dontrun{
 rk.sync (rkward::rk.record.plot)
-
+}
 }
 \seealso{
 \url{rkward://page/rkward_workspace_browser}
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 d8b78413f..0bc5d2b88 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.with.window.hints.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.with.window.hints.Rd
@@ -36,14 +36,12 @@ NOTE: This function is still somewhat experimental, and it is not guaranteed tha
 it will remain in place, with compatible parameters.
 }
 \examples{
-
-## Not run
+\dontrun{
 .rk.with.window.hints ({
    RK ()
    plot (1, 1)
 }, "attached")
-## End not run
-
+}
 }
 \author{
 Thomas Friedrichsmeier \email{rkward-devel at kde.org}
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.workplace.Rd b/rkward/rbackend/rpackages/rkward/man/rk.workplace.Rd
index acadd41f7..9458fecec 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.workplace.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.workplace.Rd
@@ -44,7 +44,6 @@ device windows will not be restored (but WILL be closed by
 rk.save.workplace ()
 rk.restore.workplace ()
 }
-
 }
 \seealso{
 \url{rkward://page/rkward_for_r_users}, \link{rk.get.workspace.url}


More information about the rkward-tracker mailing list