[rkward-cvs] SF.net SVN: rkward:[3992] trunk/rkward/packages/rkwarddev
m-eik at users.sourceforge.net
m-eik at users.sourceforge.net
Sun Oct 23 17:30:16 UTC 2011
Revision: 3992
http://rkward.svn.sourceforge.net/rkward/?rev=3992&view=rev
Author: m-eik
Date: 2011-10-23 17:30:15 +0000 (Sun, 23 Oct 2011)
Log Message:
-----------
rkwarddev: tuned the output of rk.JS.doc()
Modified Paths:
--------------
trunk/rkward/packages/rkwarddev/R/rk.JS.doc.R
trunk/rkward/packages/rkwarddev/inst/doc/rkwarddev_vignette.pdf
Modified: trunk/rkward/packages/rkwarddev/R/rk.JS.doc.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.JS.doc.R 2011-10-23 17:16:43 UTC (rev 3991)
+++ trunk/rkward/packages/rkwarddev/R/rk.JS.doc.R 2011-10-23 17:30:15 UTC (rev 3992)
@@ -43,21 +43,24 @@
"}", sep="")
js.calculate <- paste("function calculate(){\n",
- ifelse(is.null(variables), "", paste(
- indent(2, by=indent.by), "// read in variables from dialog\n",
- paste(variables, collapse=""), "\n\n", sep="")),
- ifelse(is.null(calculate),
- paste(indent(2, by=indent.by), "// put the R code to be evaluated here\n", sep=""),
- paste(calculate, "\n", sep="")),
- "}", sep="")
+ # for plots we only need something here if calculate is not empty
+ if(is.null(doPrintout) | !is.null(calculate)){paste(
+ ifelse(is.null(variables), "", paste(
+ indent(2, by=indent.by), "// read in variables from dialog\n",
+ paste(variables, collapse=""), "\n\n", sep="")),
+ ifelse(is.null(calculate),
+ paste(indent(2, by=indent.by), "// generate the R code to be evaluated here\n", sep=""),
+ paste(indent(2, by=indent.by), "// the R code to be evaluated\n",calculate, "\n", sep="")),
+ sep="")
+ } else {}, "}", sep="")
js.printout <- paste("function printout(){\n",
if(is.null(doPrintout)){
paste(
indent(2, by=indent.by), "// printout the results\n",
- indent(2, by=indent.by), echo(id("rk.header(\"", results.header, "\", level=1)")),
+ indent(2, by=indent.by), echo(id("rk.header(\"", results.header, "\", level=1)\n")),
"\n",
- ifelse(is.null(printout), echo("rk.print(\"\")"), paste("\n", printout, sep="")),
+ ifelse(is.null(printout), echo("rk.print(\"\")\n"), paste("\n", printout, sep="")),
"\n",
sep="")
} else {
@@ -84,7 +87,7 @@
indent(2, by=indent.by), "// read in variables from dialog\n",
paste(variables, collapse=""), "\n\n", sep="")),
indent(2, by=indent.by), "// create the plot\n",
- rk.paste.JS(ite("full", echo(id("rk.header(\"", results.header,"\", level=1)")))),
+ rk.paste.JS(ite("full", echo(id("rk.header(\"", results.header,"\", level=1)\n")))),
"\n\n",
doPrintout,
"\n}",
Modified: trunk/rkward/packages/rkwarddev/inst/doc/rkwarddev_vignette.pdf
===================================================================
(Binary files differ)
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