[rkward-cvs] SF.net SVN: rkward:[4180] trunk/rkward/rkward/rbackend/rpackages/rkward/R

m-eik at users.sourceforge.net m-eik at users.sourceforge.net
Thu Mar 15 11:55:36 UTC 2012


Revision: 4180
          http://rkward.svn.sourceforge.net/rkward/?rev=4180&view=rev
Author:   m-eik
Date:     2012-03-15 11:55:36 +0000 (Thu, 15 Mar 2012)
Log Message:
-----------
added "#' @export" tags to functions which later should be exported when the package gets a proper namespace

Modified Paths:
--------------
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_debugger.R
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_help.R
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/public_graphics.R
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.KDE_GUI-functions.R
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.demo.R
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.edit-functions.R
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.filename-functions.R
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.label-functions.R
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.plugin-functions.R
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.replace.function.R
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.sessionInfo.R
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.sync-functions.R
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.workspace-functions.R

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_debugger.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_debugger.R	2012-03-15 11:37:14 UTC (rev 4179)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_debugger.R	2012-03-15 11:55:36 UTC (rev 4180)
@@ -1,5 +1,6 @@
 # gather debug information.
 # Note: subsequent browser() calls should be suppressed while inside this function!
+#' @export
 .rk.callstack.info <- function () {
 	nframes <- sys.nframe() - 1	# strip this function call
 	calls <- character (0)

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_help.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_help.R	2012-03-15 11:37:14 UTC (rev 4179)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_help.R	2012-03-15 11:55:36 UTC (rev 4180)
@@ -1,6 +1,7 @@
 ## Internal functions related to help search / display
 
 # retrieve the (expected) "base" url of help files. Most importantly this will be a local port for R 2.10.0 and above, but a local directory for 2.9.x and below. As a side effect, in R 2.10.0 and above, the dynamic help server is started.
+#' @export
 ".rk.getHelpBaseUrl" <- function () {
 	port <- NA
 	if (compareVersion (as.character (getRversion()), "2.10.0") >= 0) {
@@ -21,6 +22,7 @@
 
 # a simple wrapper around help() that makes it easier to detect in code, whether help was found or not.
 # used from RKHelpSearchWindow::getFunctionHelp
+#' @export
 ".rk.getHelp" <- function (...) {
 	if (compareVersion (as.character (getRversion()), "2.10.0") >= 0) {
 		res <- help (..., help_type="html")
@@ -36,6 +38,7 @@
 }
 
 # Simple wrapper around help.search. Concatenates the relevant fields of the results in order for passing to the frontend.
+#' @export
 ".rk.get.search.results" <- function (pattern, ...) {
 	H=as.data.frame (help.search(pattern, ...)$matches)
 	# NOTE: The field "Type" was added in R 2.14.0. For earlier versions of R, only help pages were returned as results of help.search()

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/public_graphics.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/public_graphics.R	2012-03-15 11:37:14 UTC (rev 4179)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/public_graphics.R	2012-03-15 11:55:36 UTC (rev 4180)
@@ -2,6 +2,7 @@
 ## These functions are accessible to the user.
 
 # Requests a graph to be written.
+#' @export
 rk.graph.on <- function (device.type=getOption ("rk.graphics.type"), width=getOption ("rk.graphics.width"), height=getOption ("rk.graphics.height"), quality, ...) 
 {
 	if (!is.numeric (width)) width <- 480
@@ -44,6 +45,7 @@
 	invisible (ret)
 }
 
+#' @export
 "rk.graph.off" <- function(){
 	.rk.cat.output ("\n")	# so the output will be auto-refreshed
 	ret <- dev.off()
@@ -71,6 +73,7 @@
 #'   \code{\link{rk.graph.on}}
 #' @keywords utilities device
 #' @rdname rk.printer.device
+#' @export
 #' @examples
 #' 
 #' ## Not run:
@@ -86,6 +89,7 @@
 	.rk.variables$.rk.printer.devices[[as.character (dev.cur ())]] <- tf
 }
 
+#' @export
 "rk.duplicate.device" <- function (devId = dev.cur ())
 {
 	dev.set (devId)
@@ -93,6 +97,7 @@
 }
 
 # A global history of various graphics calls;
+#' @export
 "rk.record.plot" <- function ()
 {
 	env <- environment()
@@ -798,6 +803,7 @@
 
 # Users should use only these wrappers:
 # 1 is always the null device
+#' @export
 "rk.toggle.plot.history" <- function (x = TRUE)
 {
 	if (x) {
@@ -808,56 +814,67 @@
 	options ("rk.enable.graphics.history" = x)
 	invisible ()
 }
+#' @export
 "rk.first.plot" <- function (devId = dev.cur ())
 {
 	if (!getOption ("rk.enable.graphics.history")) return (invisible ())
 	rk.record.plot$showFirst (devId)
 }
+#' @export
 "rk.previous.plot" <- function (devId = dev.cur ())
 {
 	if (!getOption ("rk.enable.graphics.history")) return (invisible ())
 	rk.record.plot$showPrevious (devId)
 }
+#' @export
 "rk.next.plot" <- function (devId = dev.cur ())
 {
 	if (!getOption ("rk.enable.graphics.history")) return (invisible ())
 	rk.record.plot$showNext (devId)
 }
+#' @export
 "rk.last.plot" <- function (devId = dev.cur ())
 {
 	if (!getOption ("rk.enable.graphics.history")) return (invisible ())
 	rk.record.plot$showLast (devId)
 }
+#' @export
 "rk.goto.plot" <- function (devId = dev.cur (), index=1)
 {
 	if (!getOption ("rk.enable.graphics.history")) return (invisible ())
 	rk.record.plot$showPlot (devId, index)
 }
+#' @export
 "rk.force.append.plot" <- function (devId = dev.cur ())
 {
 	if (!getOption ("rk.enable.graphics.history")) return (invisible ())
 	rk.record.plot$forceAppend (devId)
 }
+#' @export
 "rk.removethis.plot" <- function (devId = dev.cur ())
 {
 	if (!getOption ("rk.enable.graphics.history")) return (invisible ())
 	rk.record.plot$removePlot (devId)
 }
+#' @export
 "rk.clear.plot.history" <- function ()
 {
 	if (!getOption ("rk.enable.graphics.history")) return (invisible ())
 	rk.record.plot$clearHistory ()
 }
+#' @export
 "rk.show.plot.info" <- function (devId = dev.cur ())
 {
 	if (!getOption ("rk.enable.graphics.history")) return (invisible ())
 	rk.record.plot$showPlotInfo (devId)
 }
+#' @export
 "rk.verify.plot.hist.limits" <- function (lmax)
 {
 	if (!getOption ("rk.enable.graphics.history")) return (invisible ())
 	rk.record.plot$.verify.hist.limits (as.integer (lmax))
 }
+#' @export
 "rk.plot.history.summary" <- function (which = NULL, type = c ("devices", "history"))
 {
 	ret <- NULL

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.KDE_GUI-functions.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.KDE_GUI-functions.R	2012-03-15 11:37:14 UTC (rev 4179)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.KDE_GUI-functions.R	2012-03-15 11:55:36 UTC (rev 4180)
@@ -59,12 +59,14 @@
 #' .rk.backups$select.list (LETTERS, preselect = c("A", "E", "I", "O", "U"), 
 #'   multiple = TRUE, title = "vowels")
 
+#' @export
 "rk.show.message" <- function (message, caption = "Information", wait=TRUE) {
 	.Call ("rk.dialog", caption, message, "ok", "", "", isTRUE (wait))
 	invisible (TRUE)
 }
 
 # to disable a button, set it to ""
+#' @export
 "rk.show.question" <- function (message, caption = "Question", button.yes = "yes", button.no = "no", button.cancel = "cancel") {
 	res <- .Call ("rk.dialog", caption, message, button.yes, button.no, button.cancel, TRUE)
 	if (res > 0) return (TRUE)
@@ -73,6 +75,7 @@
 }
 
 # drop-in-replacement for tk_select.list()
+#' @export
 "rk.select.list" <- function (list, preselect = NULL, multiple = FALSE, title = NULL) {
 	preselect <- as.character (preselect)
 	preselect.len = length (preselect)

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.demo.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.demo.R	2012-03-15 11:37:14 UTC (rev 4179)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.demo.R	2012-03-15 11:55:36 UTC (rev 4180)
@@ -14,6 +14,7 @@
 #'   \code{\link{demo}}
 #' @keywords utilities IO
 #' @rdname rk.demo
+#' @export
 #' @examples
 #' 
 #' ## Not run

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.edit-functions.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.edit-functions.R	2012-03-15 11:37:14 UTC (rev 4179)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.edit-functions.R	2012-03-15 11:55:36 UTC (rev 4180)
@@ -37,11 +37,13 @@
 #' 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)
 }
 
+#' @export
 "rk.edit.files" <- function (file = file, title = file, name = NULL, prompt = TRUE)
 {
 	if (!is.character (file)) {
@@ -56,11 +58,13 @@
 	invisible (.Call ("rk.edit.files",  as.character (file),  as.character (title),  as.character (name), isTRUE (prompt)))
 }
 
+#' @export
 "rk.show.files" <- function (file = file, title = file, wtitle = NULL, delete=FALSE, prompt = TRUE)
 {
 	invisible (.Call ("rk.show.files", as.character (file), as.character (title), as.character (wtitle), delete, isTRUE (prompt)))
 }
 
+#' @export
 "rk.show.html" <- function (url) {
 	invisible (.rk.do.plain.call ("showHTML", as.character (url), synchronous=FALSE));
 }

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.filename-functions.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.filename-functions.R	2012-03-15 11:37:14 UTC (rev 4179)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.filename-functions.R	2012-03-15 11:55:36 UTC (rev 4180)
@@ -49,20 +49,24 @@
 #' rk.show.html(rk.get.output.html.file())
 #' rk.set.output.html.file(outfile)
 #' 
+#' @export
 "rk.get.tempfile.name" <- function (prefix="image", extension=".jpg") {
 	return (.rk.do.plain.call ("get.tempfile.name", c (prefix, extension)))
 }
 
+#' @export
 "rk.get.workspace.url" <- function () {
 	res <- .rk.do.plain.call ("getWorkspaceUrl")
 	if (length (res)) res
 	else NULL
 }
 
+#' @export
 "rk.get.output.html.file" <- function () {
 	return (.rk.variables$.rk.output.html.file)
 }
 
+#' @export
 "rk.set.output.html.file" <- function (x) {
 	stopifnot (is.character (x))
 	assign (".rk.output.html.file", x, .rk.variables)

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.label-functions.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.label-functions.R	2012-03-15 11:37:14 UTC (rev 4179)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.label-functions.R	2012-03-15 11:55:36 UTC (rev 4180)
@@ -44,6 +44,7 @@
 #' 
 
 # retrieve the rkward label (if any) of the given object
+#' @export
 "rk.get.label" <- function (x) {
 	if (is.call (x) || is.name (x)) {
 		ret <- attr (eval (x), ".rk.meta")[names (attr (eval (x), ".rk.meta")) == "label"]
@@ -54,6 +55,7 @@
 }
 
 # set rkward label
+#' @export
 "rk.set.label" <- function (x, label, envir=parent.frame()) {
 	if (is.call (x) || is.name (x)) {
 		meta <- attr (eval (x, envir=envir), ".rk.meta")
@@ -65,6 +67,7 @@
 }
 
 # get a short name for the given object
+#' @export
 "rk.get.short.name" <- function (x) {
 	if (is.call (x) || is.name (x)) {
 		.rk.make.short.name (deparse (x))
@@ -75,6 +78,7 @@
 
 # make a short name from the given arg (a character string)
 # e.g. return "b" for a[["b"]] (but 'a::"b"' for a::"b"
+#' @export
 ".rk.make.short.name" <- function (x) {
 	splt <- strsplit (x, "[[\"", fixed=TRUE)[[1]]
 	spltlen <- length (splt)
@@ -86,6 +90,7 @@
 }
 
 # get descriptive strings for each of the arguments in ...
+#' @export
 "rk.get.description" <- function (..., paste.sep=NULL, is.substitute=FALSE) {
 	args <- list(...)
 	if (is.substitute) {
@@ -120,6 +125,7 @@
 }
 
 # Drop-in replacement for list(). Returns a list of the given arguments, but with names set according to rk.get.description
+#' @export
 "rk.list" <- function (...) {
 	ret <- list (...)
 	names (ret) <- rk.get.description (...)
@@ -127,6 +133,7 @@
 }
 
 # this is basically copied from R-base table (). Returns the arguments passed to ... as a character vector
+#' @export
 "rk.list.names" <- function(..., deparse.level=2) {
 	l <- as.list(substitute(list(...)))[-1]
 	nm <- names(l)

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.plugin-functions.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.plugin-functions.R	2012-03-15 11:37:14 UTC (rev 4179)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.plugin-functions.R	2012-03-15 11:55:36 UTC (rev 4180)
@@ -65,10 +65,12 @@
 #'
 # list all available plugins in RKWard; this is a companion function for rk.call.plugin:
 # the output provides possible strings for "plugin" argument in rk.call.plugin
+#' @export
 rk.list.plugins <- function () {
 	.rk.do.plain.call ("listPlugins")
 }
 
+#' @export
 "rk.call.plugin" <- function (plugin, ..., submit.mode = c ("manual", "auto", "submit")) {
 	# prepare arguments
 	settings <- list (...)
@@ -129,6 +131,7 @@
 #' rk.load.pluginmaps()
 #'
 #' ## END NOT RUN
+#' @export
 "rk.load.pluginmaps" <- function (pluginmap.files=NULL, force.add = TRUE, force.reload = TRUE) {
 	.rk.do.plain.call ("loadPluginMaps", c (ifelse (isTRUE (force.add), "force", "noforce"), ifelse (isTRUE (force.reload), "reload", "noreload"), as.character (pluginmap.files)), synchronous=FALSE)
 }

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R	2012-03-15 11:37:14 UTC (rev 4179)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R	2012-03-15 11:55:36 UTC (rev 4180)
@@ -88,6 +88,7 @@
 #'   'confidence interval of difference'=result$conf.int ))
 #' })
 #' 
+#' @export
 "rk.print" <- function(x,...) {
 	htmlfile <- rk.get.output.html.file()
 	if(require("R2HTML")==TRUE) {
@@ -95,10 +96,12 @@
 	}
 }
 
+#' @export
 "rk.print.code" <- function(code) {
 	.rk.cat.output (.rk.do.plain.call ("highlightRCode", as.character (code)))
 }
 
+#' @export
 "rk.header" <- function (title, parameters=list (), level=1, toc=NULL) {
 	sink (rk.get.output.html.file(), append=TRUE)
 	on.exit (sink ())
@@ -138,6 +141,7 @@
 # Dummy to allow the rkwardtest package to override rk.header() behavior, easily
 ".rk.date" <- function () date ()
 
+#' @export
 "rk.results" <- function (x, titles=NULL, print.rownames) {
 	sink (rk.get.output.html.file(), append=TRUE)
 	on.exit (sink ())
@@ -208,12 +212,14 @@
 	}
 }
 
+#' @export
 "rk.print.literal" <- function (x) {
 	cat ("<pre>", paste (x, collapse="\n"), "</pre>\n", sep="", file=rk.get.output.html.file(), append=TRUE);
 }
 
 # Describe the alternative (H1) of an htest.
 # This code adapted from stats:::print.htest
+#' @export
 "rk.describe.alternative" <- function (x) {
 	res <- ""
 	if (!is.null(x$alternative)) {

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.replace.function.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.replace.function.R	2012-03-15 11:37:14 UTC (rev 4179)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.replace.function.R	2012-03-15 11:55:36 UTC (rev 4180)
@@ -25,6 +25,7 @@
 #' @author Thomas Friedrichsmeier \email{rkward-devel@@lists.sourceforge.net}
 #' @seealso \code{\link{assignInNamespace}}, \code{\link{debug}}
 #' @keywords utilities IO
+#' @export
 #' @rdname rk.replace.function
 #' @examples
 #' 

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.sessionInfo.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.sessionInfo.R	2012-03-15 11:37:14 UTC (rev 4179)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.sessionInfo.R	2012-03-15 11:55:36 UTC (rev 4180)
@@ -12,6 +12,7 @@
 #' @author Thomas Friedrichsmeier \email{rkward-devel@@lists.sourceforge.net}
 #' @seealso \code{\link{sessionInfo}}
 #' @keywords utilities misc
+#' @export
 #' @rdname rk.sessionInf
 #' @examples
 #' 

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.sync-functions.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.sync-functions.R	2012-03-15 11:37:14 UTC (rev 4179)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.sync-functions.R	2012-03-15 11:55:36 UTC (rev 4180)
@@ -26,12 +26,14 @@
 #' rk.sync (rkward::rk.record.plot)
 #' 
 # should this really be public?
+#' @export
 "rk.sync" <- function (x) {
 	object <- deparse (substitute (x))
 	.rk.do.call ("sync", object)
 }
 
 # should this really be public?
+#' @export
 "rk.sync.global" <- function () {
 	.rk.do.call("syncglobal", ls (envir=globalenv (), all.names=TRUE))
 }

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.workspace-functions.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.workspace-functions.R	2012-03-15 11:37:14 UTC (rev 4179)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.workspace-functions.R	2012-03-15 11:55:36 UTC (rev 4180)
@@ -35,6 +35,7 @@
 #' rk.restore.workplace ()
 #' ## End not run
 #' 
+#' @export
 "rk.save.workplace" <- function (file=NULL, description=NULL) {
 	if (is.null (file)) {
 		file <- URLdecode (rk.get.workspace.url ())
@@ -46,6 +47,7 @@
 	writeLines (lines, file)
 }
 
+#' @export
 "rk.restore.workplace" <- function (file=NULL, close.windows=TRUE) {
 	if (is.null (file)) {
 		if (exists (".rk.workplace.save", envir=globalenv (), inherits=FALSE)) {

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the rkward-tracker mailing list