[rkward-cvs] SF.net SVN: rkward:[4138] trunk/rkward/packages/rkwarddev
m-eik at users.sourceforge.net
m-eik at users.sourceforge.net
Fri Dec 23 19:09:20 UTC 2011
Revision: 4138
http://rkward.svn.sourceforge.net/rkward/?rev=4138&view=rev
Author: m-eik
Date: 2011-12-23 19:09:19 +0000 (Fri, 23 Dec 2011)
Log Message:
-----------
rkwarddev: some fixes in rk.JS.doc() and rk.JS.saveobj(), addition of wrapper function rk.XML.checkbox()
Modified Paths:
--------------
trunk/rkward/packages/rkwarddev/ChangeLog
trunk/rkward/packages/rkwarddev/DESCRIPTION
trunk/rkward/packages/rkwarddev/NAMESPACE
trunk/rkward/packages/rkwarddev/R/rk.JS.doc.R
trunk/rkward/packages/rkwarddev/R/rk.JS.saveobj.R
trunk/rkward/packages/rkwarddev/R/rk.XML.cbox.R
trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R
trunk/rkward/packages/rkwarddev/inst/CITATION
trunk/rkward/packages/rkwarddev/inst/doc/rkwarddev_vignette.pdf
trunk/rkward/packages/rkwarddev/man/rk.XML.cbox.Rd
trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd
Modified: trunk/rkward/packages/rkwarddev/ChangeLog
===================================================================
--- trunk/rkward/packages/rkwarddev/ChangeLog 2011-12-21 20:51:14 UTC (rev 4137)
+++ trunk/rkward/packages/rkwarddev/ChangeLog 2011-12-23 19:09:19 UTC (rev 4138)
@@ -1,5 +1,10 @@
ChangeLog for package rkwarddev
+## 0.05-1 (2011-12-23)
+ - removed superfluous "level=1" arguments from automatic "rk.header()"s in rk.JS.doc()
+ - added wrapper function rk.XML.checkbox() for rk.XML.cbox()
+ - changed rk.JS.saveobj() to use ".GlobalEnv$" instead of "assign()" in the resulting code
+
## 0.05-0 (2011-12-14)
- "result.header" now doesn't add quotes by itself in rk.JS.doc(), so you can have R objects pasted.
previous scripts need to be adapted accordingly! the headers can also be deactivated by setting to FALSE or ""
Modified: trunk/rkward/packages/rkwarddev/DESCRIPTION
===================================================================
--- trunk/rkward/packages/rkwarddev/DESCRIPTION 2011-12-21 20:51:14 UTC (rev 4137)
+++ trunk/rkward/packages/rkwarddev/DESCRIPTION 2011-12-23 19:09:19 UTC (rev 4138)
@@ -6,16 +6,16 @@
Depends:
R (>= 2.9.0),XiMpLe,rkward (>= 0.5.6)
Enhances: rkward
-Description: Provides functions to create plugin skeletons and XML structures
- for RKWard.
+Description: Provides functions to create plugin skeletons and XML
+ structures for RKWard.
License: GPL (>= 3)
Encoding: UTF-8
LazyLoad: yes
URL: http://rkward.sourceforge.net
Authors at R: c(person(given="Meik", family="Michalke",
email="meik.michalke at hhu.de", role=c("aut", "cre")))
-Version: 0.05-0
-Date: 2011-12-14
+Version: 0.05-1
+Date: 2011-12-23
Collate:
'echo.R'
'id.R'
Modified: trunk/rkward/packages/rkwarddev/NAMESPACE
===================================================================
--- trunk/rkward/packages/rkwarddev/NAMESPACE 2011-12-21 20:51:14 UTC (rev 4137)
+++ trunk/rkward/packages/rkwarddev/NAMESPACE 2011-12-23 19:09:19 UTC (rev 4138)
@@ -36,6 +36,7 @@
export(rk.XML.attribute)
export(rk.XML.browser)
export(rk.XML.cbox)
+export(rk.XML.checkbox)
export(rk.XML.code)
export(rk.XML.col)
export(rk.XML.component)
Modified: trunk/rkward/packages/rkwarddev/R/rk.JS.doc.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.JS.doc.R 2011-12-21 20:51:14 UTC (rev 4137)
+++ trunk/rkward/packages/rkwarddev/R/rk.JS.doc.R 2011-12-23 19:09:19 UTC (rev 4138)
@@ -106,7 +106,7 @@
paste(
indent(2, by=indent.by), "// printout the results\n",
if(is.character(results.header) && !identical(results.header, "")){
- paste(indent(2, by=indent.by), echo(id("rk.header(", results.header, ", level=1)\n")), sep="")
+ paste(indent(2, by=indent.by), echo(id("rk.header(", results.header, ")\n")), sep="")
} else {},
"\n",
ifelse(is.null(printout), echo("rk.print(\"\")\n"), paste("\n", printout, sep="")),
@@ -137,7 +137,7 @@
paste(variables, collapse=""), "\n\n", sep="")),
indent(2, by=indent.by), "// create the plot\n",
if(is.character(results.header) && !identical(results.header, "")){
- rk.paste.JS(ite("full", echo(id("rk.header(", results.header,", level=1)\n"))))
+ rk.paste.JS(ite("full", echo(id("rk.header(", results.header,")\n"))))
} else {},
"\n\n",
doPrintout,
Modified: trunk/rkward/packages/rkwarddev/R/rk.JS.saveobj.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.JS.saveobj.R 2011-12-21 20:51:14 UTC (rev 4137)
+++ trunk/rkward/packages/rkwarddev/R/rk.JS.saveobj.R 2011-12-23 19:09:19 UTC (rev 4138)
@@ -79,8 +79,8 @@
this.obj <- R.objects[this.tagnum]
}
}
- # this can't be done by echo() because aof the substitution
- echo.code <- paste("echo(\"assign(\\\"\" + ", JS.var, " + \"\\\", ", this.obj, ", envir=\" + ", JS.var.parent, " + \")\\n\");", sep="")
+ # this can't be done by echo() because of the substitution
+ echo.code <- id("echo(\".GlobalEnv$\" + ", JS.var, " + \" <- ", this.obj, "\\n\");")
if(XiMpLe:::parseXMLAttr(this.tag)[["checkable"]] %in% c("T", "true", "TRUE", "1")){
JS.var.active <- camelCode(c(JS.id[1,"abbrev"], "active"))
JS.code <- ite(JS.var.active, echo.code)
@@ -89,22 +89,13 @@
}
return(rk.paste.JS(JS.code, level=2, indent.by=indent.by))
})), collapse="\n")
+
+ results <- paste(main.indent, "//// save result object\n",
+ if(!is.null(JS.vars)) {
+ paste(main.indent, "// read in saveobject variables\n", JS.vars, "\n", sep="")
+ } else {}, main.indent, "// assign object to chosen environment\n", JS.assign, sep="")
+ return(results)
} else {
return(invisible(NULL))
}
-
-# var saveCorpFreq = getValue("saveCorpFreq.active");
-# var saveCorpFreqName = getValue("saveCorpFreq");
-# var saveCorpFreqEnv = getValue("saveCorpFreq.parent");
-
-# if (saveFreq) {
-# echo("assign(\""+saveFreqName+"\", REPLACE.ME.obj, envir="+saveFreqEnv+")\n");
-# }
-
- results <- paste(main.indent, "//// save result object\n",
- if(!is.null(JS.vars)) {
- paste(main.indent, "// read in saveobject variables\n", JS.vars, "\n", sep="")
- } else {}, main.indent, "// assign object to chosen environment\n", JS.assign, sep="")
-
- return(results)
}
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.cbox.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.cbox.R 2011-12-21 20:51:14 UTC (rev 4137)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.cbox.R 2011-12-23 19:09:19 UTC (rev 4138)
@@ -7,6 +7,7 @@
#' @param id.name Character string, a unique ID for this plugin element.
#' If \code{"auto"}, an ID will be generated automatically from the label.
#' @return An object of class \code{XiMpLe.node}.
+#' @note There's also a simple wrapper function \code{rk.XML.checkbox}.
#' @export
#' @seealso \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard}
#' @examples
@@ -37,3 +38,9 @@
return(checkbox)
}
+
+## wrapper for name scheme consistency
+#' @export
+rk.XML.checkbox <- function(label, value="true", un.value=NULL, chk=FALSE, id.name="auto"){
+ rk.XML.cbox(label=label, value=value, un.value=un.value, chk=chk, id.name=id.name)
+}
Modified: trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R 2011-12-21 20:51:14 UTC (rev 4137)
+++ trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R 2011-12-23 19:09:19 UTC (rev 4138)
@@ -3,8 +3,8 @@
#' \tabular{ll}{
#' Package: \tab rkwarddev\cr
#' Type: \tab Package\cr
-#' Version: \tab 0.05-0\cr
-#' Date: \tab 2011-12-14\cr
+#' Version: \tab 0.05-1\cr
+#' Date: \tab 2011-12-23\cr
#' Depends: \tab R (>= 2.9.0),XiMpLe,rkward (>= 0.5.6)\cr
#' Enhances: \tab rkward\cr
#' Encoding: \tab UTF-8\cr
Modified: trunk/rkward/packages/rkwarddev/inst/CITATION
===================================================================
--- trunk/rkward/packages/rkwarddev/inst/CITATION 2011-12-21 20:51:14 UTC (rev 4137)
+++ trunk/rkward/packages/rkwarddev/inst/CITATION 2011-12-23 19:09:19 UTC (rev 4138)
@@ -2,12 +2,12 @@
title="rkwarddev: A collection of tools for RKWard plugin development",
author="Meik Michalke",
year="2011",
- note="(Version 0.05-0)",
+ note="(Version 0.05-1)",
url="http://rkward.sourceforge.net",
textVersion =
paste("Michalke, M. (2011). ",
- "rkwarddev: A collection of tools for RKWard plugin development (Version 0.05-0). ",
+ "rkwarddev: A collection of tools for RKWard plugin development (Version 0.05-1). ",
"Available from http://rkward.sourceforge.net",
sep=""),
Modified: trunk/rkward/packages/rkwarddev/inst/doc/rkwarddev_vignette.pdf
===================================================================
(Binary files differ)
Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.cbox.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.cbox.Rd 2011-12-21 20:51:14 UTC (rev 4137)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.cbox.Rd 2011-12-23 19:09:19 UTC (rev 4138)
@@ -28,6 +28,10 @@
\description{
Create XML node "checkbox" for RKWard plugins
}
+\note{
+ There's also a simple wrapper function
+ \code{rk.XML.checkbox}.
+}
\examples{
test.checkboxes <- rk.XML.row(rk.XML.col(
list(
Modified: trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd 2011-12-21 20:51:14 UTC (rev 4137)
+++ trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd 2011-12-23 19:09:19 UTC (rev 4138)
@@ -11,8 +11,8 @@
}
\details{
\tabular{ll}{ Package: \tab rkwarddev\cr Type: \tab
- Package\cr Version: \tab 0.05-0\cr Date: \tab
- 2011-12-14\cr Depends: \tab R (>= 2.9.0),XiMpLe,rkward
+ Package\cr Version: \tab 0.05-1\cr Date: \tab
+ 2011-12-23\cr Depends: \tab R (>= 2.9.0),XiMpLe,rkward
(>= 0.5.6)\cr Enhances: \tab rkward\cr Encoding: \tab
UTF-8\cr License: \tab GPL (>= 3)\cr LazyLoad: \tab
yes\cr URL: \tab http://rkward.sourceforge.net\cr }
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