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

m-eik at users.sourceforge.net m-eik at users.sourceforge.net
Thu Mar 15 12:04:33 UTC 2012


Revision: 4181
          http://rkward.svn.sourceforge.net/rkward/?rev=4181&view=rev
Author:   m-eik
Date:     2012-03-15 12:04:33 +0000 (Thu, 15 Mar 2012)
Log Message:
-----------
using assign instead of $ and <- here, just to make it more obvious that .rk.variables is an environment

Modified Paths:
--------------
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_graphics.R

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R	2012-03-15 11:55:36 UTC (rev 4180)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R	2012-03-15 12:04:33 UTC (rev 4181)
@@ -324,11 +324,12 @@
 }
 
 # General purpose storage environment (which will hopefully never get locked by R)
+#' @export
 ".rk.variables" <- new.env ()
-.rk.variables$.rk.active.device <- 1
-.rk.variables$.rk.output.html.file <- NULL
-.rk.variables$.rk.rkreply <- NULL
-.rk.variables$available.packages.cache <- NULL
+assign(".rk.active.device", 1, envir=.rk.variables)
+assign(".rk.output.html.file", NULL, envir=.rk.variables)
+assign(".rk.rkreply", NULL, envir=.rk.variables)
+assign("available.packages.cache", NULL, envir=.rk.variables)
 
 ".rk.backups" <- new.env ()
 

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_graphics.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_graphics.R	2012-03-15 11:55:36 UTC (rev 4180)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_graphics.R	2012-03-15 12:04:33 UTC (rev 4181)
@@ -2,6 +2,7 @@
 ## These functions are _not_ supposed to be called by the end user.
 
 # overriding x11 to get informed, when a new x11 window is opened
+#' @export
 "rk.screen.device" <- function (..., is.being.duplicated = FALSE, is.preview.device = FALSE) {
 	.rk.do.call ("startOpenX11", as.character (dev.cur ()));
 
@@ -34,8 +35,10 @@
 	invisible (x)
 }
 
+#' @export
 "x11" <- rk.screen.device
 
+#' @export
 "X11" <- x11
 
 if (base::.Platform$OS.type == "windows") {
@@ -45,9 +48,10 @@
 
 # set from rkward the application:
 # options(device="rk.screen.device")
+#' @include internal.R
+assign(".rk.preview.devices", list (), envir=.rk.variables)
 
-.rk.variables$.rk.preview.devices <- list ()
-
+#' @export
 ".rk.startPreviewDevice" <- function (x) {
 	a <- .rk.variables$.rk.preview.devices[[x]]
 	if (is.null (a)) {
@@ -61,6 +65,7 @@
 	}
 }
 
+#' @export
 ".rk.killPreviewDevice" <- function (x) {
 	a <- .rk.variables$.rk.preview.devices[[x]]
 	if (!is.null (a)) {
@@ -74,6 +79,7 @@
 .rk.variables$.rk.printer.devices <- list ()
 
 # see .rk.fix.assignmetns () in internal.R
+#' @export
 ".rk.fix.assignments.graphics" <- function ()
 {
 	rk.replace.function ("plot.new", as.environment ("package:graphics"),

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