[rkward-cvs] SF.net SVN: rkward-code:[4579] trunk/rkward/packages/rkwarddev
m-eik at users.sf.net
m-eik at users.sf.net
Sun Mar 10 22:08:36 UTC 2013
Revision: 4579
http://sourceforge.net/p/rkward/code/4579
Author: m-eik
Date: 2013-03-10 22:08:35 +0000 (Sun, 10 Mar 2013)
Log Message:
-----------
rkwarddev: replaced paste(..., sep="") with paste0(...); added some *.not and *.numeric modifiers; fixed a bug in rk.XML.scan() regarding handling of <frame>; and made getter guessing smarter, as it can now check for modifiers.
Modified Paths:
--------------
trunk/rkward/packages/rkwarddev/ChangeLog
trunk/rkward/packages/rkwarddev/DESCRIPTION
trunk/rkward/packages/rkwarddev/NAMESPACE
trunk/rkward/packages/rkwarddev/R/echo.R
trunk/rkward/packages/rkwarddev/R/id.R
trunk/rkward/packages/rkwarddev/R/join.R
trunk/rkward/packages/rkwarddev/R/rk-internal.R
trunk/rkward/packages/rkwarddev/R/rk.JS.doc.R
trunk/rkward/packages/rkwarddev/R/rk.JS.saveobj.R
trunk/rkward/packages/rkwarddev/R/rk.JS.scan.R
trunk/rkward/packages/rkwarddev/R/rk.XML.browser.R
trunk/rkward/packages/rkwarddev/R/rk.XML.component.R
trunk/rkward/packages/rkwarddev/R/rk.XML.context.R
trunk/rkward/packages/rkwarddev/R/rk.XML.convert.R
trunk/rkward/packages/rkwarddev/R/rk.XML.embed.R
trunk/rkward/packages/rkwarddev/R/rk.XML.entry.R
trunk/rkward/packages/rkwarddev/R/rk.XML.formula.R
trunk/rkward/packages/rkwarddev/R/rk.XML.insert.R
trunk/rkward/packages/rkwarddev/R/rk.XML.matrix.R
trunk/rkward/packages/rkwarddev/R/rk.XML.plugin.R
trunk/rkward/packages/rkwarddev/R/rk.XML.pluginmap.R
trunk/rkward/packages/rkwarddev/R/rk.XML.snippets.R
trunk/rkward/packages/rkwarddev/R/rk.XML.varslot.R
trunk/rkward/packages/rkwarddev/R/rk.build.plugin.R
trunk/rkward/packages/rkwarddev/R/rk.paste.JS.R
trunk/rkward/packages/rkwarddev/R/rk.plotOptions.R
trunk/rkward/packages/rkwarddev/R/rk.plugin.component.R
trunk/rkward/packages/rkwarddev/R/rk.plugin.skeleton.R
trunk/rkward/packages/rkwarddev/R/rk.rkh.link.R
trunk/rkward/packages/rkwarddev/R/rk.rkh.related.R
trunk/rkward/packages/rkwarddev/R/rk.testsuite.doc.R
trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R
trunk/rkward/packages/rkwarddev/R/tf.R
trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd
Modified: trunk/rkward/packages/rkwarddev/ChangeLog
===================================================================
--- trunk/rkward/packages/rkwarddev/ChangeLog 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/ChangeLog 2013-03-10 22:08:35 UTC (rev 4579)
@@ -1,6 +1,6 @@
ChangeLog for package rkwarddev
-changes in version 0.06-2 (2013-02-25)
+changes in version 0.06-2 (2013-03-10)
changed:
- the structure of <about> nodes will change in RKWard 0.6.1,
<dependencies> will become a direct child of <document> or <component>, which explains
@@ -20,6 +20,8 @@
- updated the skeleton_dialog.R demo file and recreated the plugin code
- JavaScript functions like rk.JS.scan() and id() learned how to treat
<optionset>, <optioncolumn> and <matrix>
+ - internally paste(..., sep="") was replaced with paste0(...), in a way that ensures
+ compatibility with R < 2.15
added:
- new function rk.XML.switch()
- new function rk.XML.optiondisplay()
@@ -34,8 +36,13 @@
- added "map" to rk.XML.require()
- the new class rk.JS.echo allows having objects in an echo() statement
without quoting it
+ - new combined modifiers "visible.not", "visible.numeric", "enabled.not", "enabled.numeric",
+ "state.not" and "state.numeric" are now supported
fixed:
- added some missing parameter in the docs for rk.paste.JS.graph()
+ - fixed a bug in the modifier checks; this unveiled a bug in how rk.JS.scan() dealt with <frame>
+ nodes, which was also fixed
+ - fixed a duplicate entry in this ChangeLog for version 0.04-6
changes in version 0.06-1 (2012-11-08)
changed:
@@ -149,8 +156,6 @@
changes in version 0.04-6 (2011-10-31)
- added <frame> to the tags which are scanned by rk.JS.scan(), they're
considered only if checkable
- - added <frame> to the tags which are scanned by rk.JS.scan(), they're
- considered only if checkable
- improved output of rk.JS.var class objects by rk.paste.JS()
changes in version 0.04-5 (2011-10-28)
Modified: trunk/rkward/packages/rkwarddev/DESCRIPTION
===================================================================
--- trunk/rkward/packages/rkwarddev/DESCRIPTION 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/DESCRIPTION 2013-03-10 22:08:35 UTC (rev 4579)
@@ -6,8 +6,8 @@
Depends:
R (>= 2.9.0),methods,XiMpLe (>= 0.03-18),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
@@ -15,7 +15,7 @@
Authors at R: c(person(given="Meik", family="Michalke",
email="meik.michalke at hhu.de", role=c("aut", "cre")))
Version: 0.06-2
-Date: 2013-02-25
+Date: 2013-03-10
Collate:
'echo.R'
'id.R'
Modified: trunk/rkward/packages/rkwarddev/NAMESPACE
===================================================================
--- trunk/rkward/packages/rkwarddev/NAMESPACE 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/NAMESPACE 2013-03-10 22:08:35 UTC (rev 4579)
@@ -1,3 +1,9 @@
+exportClasses(rk.JS.arr)
+exportClasses(rk.JS.ite)
+exportClasses(rk.JS.opt)
+exportClasses(rk.JS.var)
+exportClasses(rk.plot.opts)
+exportClasses(rk.plug.comp)
export(echo)
export(id)
export(ite)
@@ -2,3 +8,6 @@
export(join)
+exportMethods(show)
export(qp)
+export(rk.build.plugin)
+export(rk.comment)
export(rk.JS.array)
@@ -9,6 +18,24 @@
export(rk.JS.saveobj)
export(rk.JS.scan)
export(rk.JS.vars)
+export(rk.paste.JS)
+export(rk.paste.JS.graph)
+export(rk.plotOptions)
+export(rk.plugin.component)
+export(rk.plugin.skeleton)
+export(rk.rkh.caption)
+export(rk.rkh.doc)
+export(rk.rkh.link)
+export(rk.rkh.related)
+export(rk.rkh.scan)
+export(rk.rkh.section)
+export(rk.rkh.setting)
+export(rk.rkh.settings)
+export(rk.rkh.summary)
+export(rk.rkh.technical)
+export(rk.rkh.title)
+export(rk.rkh.usage)
+export(rk.testsuite.doc)
export(rk.XML.about)
export(rk.XML.attribute)
export(rk.XML.browser)
@@ -62,32 +89,5 @@
export(rk.XML.varselector)
export(rk.XML.varslot)
export(rk.XML.wizard)
-export(rk.build.plugin)
-export(rk.comment)
-export(rk.paste.JS)
-export(rk.paste.JS.graph)
-export(rk.plotOptions)
-export(rk.plugin.component)
-export(rk.plugin.skeleton)
-export(rk.rkh.caption)
-export(rk.rkh.doc)
-export(rk.rkh.link)
-export(rk.rkh.related)
-export(rk.rkh.scan)
-export(rk.rkh.section)
-export(rk.rkh.setting)
-export(rk.rkh.settings)
-export(rk.rkh.summary)
-export(rk.rkh.technical)
-export(rk.rkh.title)
-export(rk.rkh.usage)
-export(rk.testsuite.doc)
export(tf)
-exportClasses(rk.JS.arr)
-exportClasses(rk.JS.ite)
-exportClasses(rk.JS.opt)
-exportClasses(rk.JS.var)
-exportClasses(rk.plot.opts)
-exportClasses(rk.plug.comp)
-exportMethods(show)
import(methods)
Modified: trunk/rkward/packages/rkwarddev/R/echo.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/echo.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/echo.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -22,7 +22,7 @@
echo <- function(..., newline=""){
ID.content <- qp(...)
- result <- paste("echo(", ID.content, ");", newline, sep="")
+ result <- paste0("echo(", ID.content, ");", newline)
return(result)
}
Modified: trunk/rkward/packages/rkwarddev/R/id.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/id.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/id.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -59,7 +59,7 @@
node.id <- paste.JS.var(this.part, names.only=TRUE)
if(length(node.id) > 1){
node.id <- node.id[1]
- warning(paste("Object contained more than one ID, only the first one was used: ", node.id, sep=""), call.=FALSE)
+ warning(paste0("Object contained more than one ID, only the first one was used: ", node.id), call.=FALSE)
} else {}
return(node.id)
} else if(inherits(this.part, "rk.JS.echo")){
Modified: trunk/rkward/packages/rkwarddev/R/join.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/join.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/join.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -28,7 +28,7 @@
}
JS.join <- new("rk.JS.echo",
- value=paste(camelCode(arr.name), ".join(", qp(by) ,")", sep="")
+ value=paste0(camelCode(arr.name), ".join(", qp(by) ,")")
)
return(JS.join)
Modified: trunk/rkward/packages/rkwarddev/R/rk-internal.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk-internal.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk-internal.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -1,8 +1,17 @@
# internal functions for the rk.* functions
+## wrapper for paste0() needed?
+if(isTRUE(R_system_version(getRversion()) < 2.15)){
+ # if this is an older R version, we need a wrapper function for paste0()
+ # which was introduced with R 2.15 as a more efficient shortcut to paste(..., sep="")
+ paste0 <- function(..., collapse=NULL){
+ return(paste(..., sep="", collapse=collapse))
+ }
+} else {}
+
# info message
-generator.info <- rk.comment(paste("this code was generated using the rkwarddev package.\n",
- "perhaps don't make changes here, but in the rkwarddev script instead!", sep=""))
+generator.info <- rk.comment(paste0("this code was generated using the rkwarddev package.\n",
+ "perhaps don't make changes here, but in the rkwarddev script instead!"))
## function auto.ids()
auto.ids <- function(identifiers, prefix=NULL, suffix=NULL, chars=8){
@@ -12,7 +21,7 @@
if(any(duplicated(id.names))){
warning("IDs are not unique, please check!")
} else {}
- ids <- paste(prefix, id.names, suffix, sep="")
+ ids <- paste0(prefix, id.names, suffix)
return(ids)
} ## end function auto.ids()
@@ -85,9 +94,9 @@
return(TRUE)
} else {
if(!is.null(action)){
- action <- paste(action, ": ", sep="")
+ action <- paste0(action, ": ")
} else {}
- warning(paste(action, "Skipping existing file ", file.name, ".", sep=""), call.=FALSE)
+ warning(paste0(action, "Skipping existing file ", file.name, "."), call.=FALSE)
return(FALSE)
}
} ## end function checkCreateFiles()
@@ -168,7 +177,7 @@
this.tag.id <- paste(this.tag.setid, this.tag.id, sep=".")
} else {}
# for safety, prefix the column ID with a constant
- this.tag.id.abbrev <- paste("ocol_", this.tag.id.abbrev, sep="")
+ this.tag.id.abbrev <- paste0("ocol_", this.tag.id.abbrev)
} else {}
} else {
this.tag.name <- XiMpLe:::XML.tagName(this.tag)
@@ -180,12 +189,12 @@
this.tag.id <- paste(this.tag.setid, this.tag.id, sep=".")
} else {}
# for safety, prefix the column ID with a constant
- this.tag.id.abbrev <- paste("ocol_", this.tag.id.abbrev, sep="")
+ this.tag.id.abbrev <- paste0("ocol_", this.tag.id.abbrev)
} else {}
}
if(isTRUE(add.abbrev)){
- this.tag.id.abbrev <- paste(ID.prefix(this.tag.name), this.tag.id.abbrev, sep="")
+ this.tag.id.abbrev <- paste0(ID.prefix(this.tag.name), this.tag.id.abbrev)
} else {}
if(isTRUE(tag.names)){
return(c(id=this.tag.id, abbrev=this.tag.id.abbrev, tag=this.tag.name))
@@ -200,7 +209,7 @@
if("id" %in% names(ids)){
multiple.id <- duplicated(ids[,"id"])
if(any(multiple.id)){
- warning(paste("IDs are not unique:\n ", paste(ids[multiple.id,"id"], collapse=", "), "\n Expect errors!", sep=""))
+ warning(paste0("IDs are not unique:\n ", paste(ids[multiple.id,"id"], collapse=", "), "\n Expect errors!"))
} else {}
}
@@ -260,7 +269,7 @@
return(word.new)
})
- results <- paste(words[1], paste(new.words, collapse=""), sep="")
+ results <- paste0(words[1], paste(new.words, collapse=""))
return(results)
} ## end function camelCode()
@@ -268,8 +277,7 @@
## default getters for JavaScript variables
# try to set useful default getter functions to query the values from XML nodes
-# will only be used if "guess.getter" is true -- and after it's properly implemented
-# into rk.JS.scan()
+# will only be used if "guess.getter" is true
JS.getters.default <- list(
"browser"="getString",
"checkbox"="getBoolean",
@@ -283,6 +291,50 @@
"spinbox"="getString",
"varslot"="getString"
)
+# we can also guess some fitting getter functions by the modifier set
+JS.getters.modif.default <- list(
+# "active",
+# "available",
+# "calculate",
+ "checked"="getBoolean",
+ "checked.not"="getBoolean",
+ "checked.numeric"="getBoolean",
+ "dependent"="getString",
+ "enabled"="getBoolean",
+ "enabled.not"="getBoolean",
+ "enabled.numeric"="getBoolean",
+# "false",
+ "fixed_factors"="getString",
+# "int",
+ "label"="getString",
+ "labels"="getString",
+ "model"="getString",
+# "not",
+# "number",
+# "numeric",
+ "objectname"="getString",
+ "parent"="getString",
+ "preprocess"="getString",
+ "preview"="getBoolean",
+ "printout"="getString",
+# "real",
+ "required"="getBoolean",
+# "root",
+# "selected",
+# "selection",
+ "shortname"="getString",
+ "source"="getString",
+ "state"="getBoolean",
+ "state.not"="getBoolean",
+ "state.numeric"="getBoolean",
+ "string"="getString",
+# "table",
+ "text"="getString",
+# "true",
+ "visible"="getBoolean",
+ "visible.not"="getBoolean",
+ "visible.numeric"="getBoolean"
+)
## function get.JS.vars()
# <tag id="my.id" ...>
@@ -335,15 +387,32 @@
any(!c(XMLAttrs(XML.var)[["value"]], XMLAttrs(XML.var)[["value_unchecked"]]) %in% c("true","false"))){
getter <- "getString"
} else {
- getter <- JS.getters.default[[tag.name]]
+ # check if a modifier is given and we have a default for it
+ # modifiers were probably checked already
+ ## TODO: currently this only works for one modifier of if all
+ ## modifiers are fine with the same getter; maybe "getter"
+ ## should become a vector like "modifiers"
+ if(!is.null(modifiers) && any(modifiers %in% names(JS.getters.modif.default))){
+ # find all matching modifiers
+ getter.modifs <- modifiers[modifiers %in% names(JS.getters.modif.default)]
+ all.getters <- unique(unlist(JS.getters.modif.default[getter.modifs]))
+ if(length(all.getters) > 1){
+ warning("For the modifiers you specified, different getter functions were found. Only using the first one!", call.=FALSE)
+ getter <- all.getters[1]
+ } else {
+ getter <- all.getters
+ }
+ } else {
+ getter <- JS.getters.default[[tag.name]]
+ }
}
} else {}
} else {
# if guess.getters is off but we're dealing with <matrix> or <optionset>,
# throw in a warning:
if(tag.name %in% c("matrix", "optioncolumn") && identical(getter, "getValue")){
- warning(paste("Your plugin contains the <", tag.name, "> element, but 'guess.getter' is off. ",
- "Using the default getValue() on this node might cause problems!", sep=""), call.=FALSE)
+ warning(paste0("Your plugin contains the <", tag.name, "> element, but 'guess.getter' is off. ",
+ "Using the default getValue() on this node might cause problems!"), call.=FALSE)
} else {}
}
XML.var <- check.ID(XML.var)
@@ -392,9 +461,9 @@
prfx <- NULL
}
if(isTRUE(dot)){
- prfx <- paste(prfx, ".", sep="")
+ prfx <- paste0(prfx, ".")
} else {
- prfx <- paste(prfx, "_", sep="")
+ prfx <- paste0(prfx, "_")
}
return(prfx)
} ## end function ID.prefix()
@@ -403,13 +472,13 @@
## function node.soup()
# pastes the nodes as XML, only alphanumeric characters, e.g. to generate auto-IDs
node.soup <- function(nodes){
- the.soup <- paste(unlist(sapply(child.list(nodes), function(this.node){
+ the.soup <- paste0(unlist(sapply(child.list(nodes), function(this.node){
if(is.XiMpLe.node(this.node)){
return(gsub("[^[:alnum:]]", "", pasteXML(this.node, shine=0)))
} else {
stop(simpleError("Nodes must be of class XiMpLe.node!"))
}
- })), sep="", collapse="")
+ })), collapse="")
return(the.soup)
} ## end function node.soup()
@@ -427,9 +496,9 @@
}
make.vector <- function(value){
if(grepl(",", value)){
- value <- paste("c(\"", paste(trim(unlist(strsplit(value, ","))), collapse="\", \""), "\")", sep="")
+ value <- paste0("c(\"", paste(trim(unlist(strsplit(value, ","))), collapse="\", \""), "\")")
} else {
- value <- paste("\"", value, "\"", sep="")
+ value <- paste0("\"", value, "\"")
}
return(value)
}
@@ -441,12 +510,12 @@
family <- make.vector(attrs[["family"]])
email <- make.vector(attrs[["email"]])
role <- make.vector(attrs[["role"]])
- this.author <- paste("person(given=", given, ", family=", family, ", email=", email, ", role=", role, ")", sep="")
+ this.author <- paste0("person(given=", given, ", family=", family, ", email=", email, ", role=", role, ")")
all.authors[length(all.authors) + 1] <- this.author
} else {}
}
if(length(all.authors) > 1){
- all.authors <- paste("c(", paste(all.authors, collapse=", "), ")", sep="")
+ all.authors <- paste0("c(", paste(all.authors, collapse=", "), ")")
} else {}
if(isTRUE(eval)){
all.authors <- eval(parse(text=all.authors))
@@ -478,17 +547,17 @@
# first see if RKWard and R versions are given
deps.RkR <- XMLAttrs(got.deps)
deps.RkR.options <- names(deps.RkR)
- R.min <- ifelse("R_min_version" %in% deps.RkR.options, paste(">= ", deps.RkR[["R_min_version"]], sep=""), "")
- R.max <- ifelse("R_max_version" %in% deps.RkR.options, paste("< ", deps.RkR[["R_max_version"]], sep=""), "")
+ R.min <- ifelse("R_min_version" %in% deps.RkR.options, paste0(">= ", deps.RkR[["R_min_version"]]), "")
+ R.max <- ifelse("R_max_version" %in% deps.RkR.options, paste0("< ", deps.RkR[["R_max_version"]]), "")
R.version.indices <- sum(!identical(R.min, ""), !identical(R.max, ""))
if(R.version.indices > 0 & identical(mode, "depends")){
- deps.packages[[length(deps.packages) + 1]] <- paste("R (", R.min, ifelse(R.version.indices > 1, ", ", ""), R.max, ")", sep="")
+ deps.packages[[length(deps.packages) + 1]] <- paste0("R (", R.min, ifelse(R.version.indices > 1, ", ", ""), R.max, ")")
} else {}
- Rk.min <- ifelse("rkward_min_version" %in% deps.RkR.options, paste(">= ", deps.RkR[["rkward_min_version"]], sep=""), "")
- Rk.max <- ifelse("rkward_max_version" %in% deps.RkR.options, paste("< ", deps.RkR[["rkward_max_version"]], sep=""), "")
+ Rk.min <- ifelse("rkward_min_version" %in% deps.RkR.options, paste0(">= ", deps.RkR[["rkward_min_version"]]), "")
+ Rk.max <- ifelse("rkward_max_version" %in% deps.RkR.options, paste0("< ", deps.RkR[["rkward_max_version"]]), "")
Rk.version.indices <- sum(!identical(Rk.min, ""), !identical(Rk.max, ""))
if(Rk.version.indices > 0 && identical(mode, "depends")){
- deps.packages[[length(deps.packages) + 1]] <- paste("rkward (", Rk.min, ifelse(Rk.version.indices > 1, ", ", ""), Rk.max, ")", sep="")
+ deps.packages[[length(deps.packages) + 1]] <- paste0("rkward (", Rk.min, ifelse(Rk.version.indices > 1, ", ", ""), Rk.max, ")")
} else {}
check.deps.pckg <- sapply(XMLChildren(got.deps), function(this.child){identical(XMLName(this.child), "package")})
if(any(check.deps.pckg) && ((isTRUE(suggest) && identical(mode, "suggest")) | !isTRUE(suggest))){
@@ -496,15 +565,15 @@
this.pckg.dep <- XMLAttrs(XMLChildren(got.deps)[[this.pckg]])
pckg.options <- names(this.pckg.dep)
pckg.name <- this.pckg.dep[["name"]]
- pckg.min <- ifelse("min" %in% pckg.options, paste(">= ", this.pckg.dep[["min"]], sep=""), "")
- pckg.max <- ifelse("max" %in% pckg.options, paste("< ", this.pckg.dep[["max"]], sep=""), "")
+ pckg.min <- ifelse("min" %in% pckg.options, paste0(">= ", this.pckg.dep[["min"]]), "")
+ pckg.max <- ifelse("max" %in% pckg.options, paste0("< ", this.pckg.dep[["max"]]), "")
version.indices <- sum(!identical(pckg.min, ""), !identical(pckg.max, ""))
if(version.indices > 0){
- pckg.version <- paste(" (", pckg.min, ifelse(version.indices > 1, ", ", ""), pckg.max, ")", sep="")
+ pckg.version <- paste0(" (", pckg.min, ifelse(version.indices > 1, ", ", ""), pckg.max, ")")
} else {
pckg.version <- ""
}
- return(paste(pckg.name, pckg.version, sep=""))
+ return(paste0(pckg.name, pckg.version))
}), collapse=", ")
} else {}
results <- paste(unlist(deps.packages), collapse=", ")
@@ -550,16 +619,16 @@
## list with valid modifiers
all.valid.modifiers <- list(
- all=c("", "visible", "enabled", "required", "true", "false", "not", "numeric",
- "preprocess", "calculate", "printout", "preview"),
+ all=c("", "visible", "visible.not", "visible.numeric", "enabled", "enabled.not", "enabled.numeric",
+ "required", "true", "false", "not", "numeric", "preprocess", "calculate", "printout", "preview"),
text=c("text"),
varselector=c("selected", "root"),
varslot=c("available", "selected", "source", "shortname", "label"),
radio=c("string", "number"),
dropdown=c("string", "number"),
# option=c(),
- checkbox=c("state"),
- frame=c("checked"),
+ checkbox=c("state", "state.not", "state.numeric"),
+ frame=c("checked", "checked.not", "checked.numeric"),
input=c("text"),
browser=c("selection"),
saveobject=c("selection", "parent", "objectname", "active"),
@@ -568,7 +637,7 @@
# removed embed, can be all sorts of stuff, see e.g. generic plot options
# embed=c("code"),
# for the same reason external is not listed here
- preview=c("state")
+ preview=c("state", "state.not", "state.numeric")
) ## end list with valid modifiers
@@ -597,11 +666,7 @@
} else if(identical(source, "all")){
tag.name <- "<any tag>"
} else {
- if(isTRUE(bool)){
- return(TRUE)
- } else {
- return(modifier)
- }
+ tag.name <- source
}
if(tag.name %in% names(all.valid.modifiers)){
@@ -615,16 +680,16 @@
invalid.modif <- !unlist(modifier) %in% valid.modifs
if(any(invalid.modif)){
if(isTRUE(warn.only)){
- warning(paste("Some modifier you provided is invalid for '",tag.name,"' and was ignored: ",
- paste(modifier[invalid.modif], collapse=", "), sep=""), call.=FALSE)
+ warning(paste0("Some modifier you provided is invalid for '",tag.name,"' and was ignored: ",
+ paste(modifier[invalid.modif], collapse=", ")), call.=FALSE)
if(isTRUE(bool)){
return(!invalid.modif)
} else {
return("")
}
} else {
- stop(simpleError(paste("Some modifier you provided is invalid for '",tag.name,"' and was ignored: ",
- paste(modifier[invalid.modif], collapse=", "), sep="")))
+ stop(simpleError(paste0("Some modifier you provided is invalid for '",tag.name,"' and was ignored: ",
+ paste(modifier[invalid.modif], collapse=", "))))
}
} else {
if(isTRUE(bool)){
@@ -686,14 +751,14 @@
if(is.XiMpLe.node(this.child)){
return(XMLName(this.child))
} else {
- stop(simpleError(paste("Invalid object for ", section, " section, must be of class XiMpLe.node, but got class ", class(this.child), "!", sep="")))
+ stop(simpleError(paste0("Invalid object for ", section, " section, must be of class XiMpLe.node, but got class ", class(this.child), "!")))
}
})
} else {}
invalid.sets <- !node.names %in% all.valid.children[[parent]]
if(any(invalid.sets)){
- return.message <- paste("Invalid XML nodes for ", section, " section: ", paste(node.names[invalid.sets], collapse=", "), sep="")
+ return.message <- paste0("Invalid XML nodes for ", section, " section: ", paste(node.names[invalid.sets], collapse=", "))
if(isTRUE(warn)){
warning(return.message)
return(FALSE)
@@ -718,7 +783,7 @@
if(identical(node.name, parent)){
return(TRUE)
} else {
- return.message <- paste("I don't know what this is, but '", parent, "' is not a <", parent, "> section!", sep="")
+ return.message <- paste0("I don't know what this is, but '", parent, "' is not a <", parent, "> section!")
if(isTRUE(warn)){
warning(return.message)
return(FALSE)
@@ -728,9 +793,9 @@
}
} else {
stop(simpleError(
- paste("'", parent, "' must be a XiMpLe.node",
- if(!is.null(see)){paste(", see ?", see, sep="")},
- "!", sep=""))
+ paste0("'", parent, "' must be a XiMpLe.node",
+ if(!is.null(see)){paste0(", see ?", see)},
+ "!"))
)
}
} ## end function valid.parent()
@@ -741,7 +806,7 @@
if(inherits(value, type)){
return(invisible(NULL))
} else {
- msg.text <- paste(sQuote(var.name), " should be of type ", type, "!", sep="")
+ msg.text <- paste0(sQuote(var.name), " should be of type ", type, "!")
if(isTRUE(warn.only)){
warning(msg.text)
} else {
@@ -757,7 +822,7 @@
name <- gsub("[[:space:]]*[^[:alnum:]_.]*", "", name)
if(!identical(name.orig, name)){
if(isTRUE(message)){
- message(paste("For file names ", sQuote(name.orig), " was renamed to ", sQuote(name), ".", sep=""))
+ message(paste0("For file names ", sQuote(name.orig), " was renamed to ", sQuote(name), "."))
} else {}
} else {}
return(name)
@@ -774,30 +839,30 @@
# if this is not a single "if" but an "else if", do not indent
if(isTRUE(recurse)){
- ifJS <- paste("if(", slot(object, "ifJS"), ") {\n", sep="")
+ ifJS <- paste0("if(", slot(object, "ifJS"), ") {\n")
} else {
- ifJS <- paste(main.indent, "if(", slot(object, "ifJS"), ") {\n", sep="")
+ ifJS <- paste0(main.indent, "if(", slot(object, "ifJS"), ") {\n")
}
if(nchar(slot(object, "thenJS")) > 0) {
# chop off beginning indent strings, otherwiese they ruin the code layout
- thenJS.clean <- gsub(paste("^", indent.by, "*", sep=""), "", slot(object, "thenJS"))
- thenJS <- paste(scnd.indent, thenJS.clean, "\n", main.indent, "}", sep="")
+ thenJS.clean <- gsub(paste0("^", indent.by, "*"), "", slot(object, "thenJS"))
+ thenJS <- paste0(scnd.indent, thenJS.clean, "\n", main.indent, "}")
} else {
# if there is another rk.JS.ite object, call with recursion
if(length(slot(object, "thenifJS")) == 1){
- thenJS <- paste(paste.JS.ite(slot(object, "thenifJS")[[1]], level=level+1, indent.by=indent.by), "\n", main.indent, "}", sep="")
+ thenJS <- paste0(paste.JS.ite(slot(object, "thenifJS")[[1]], level=level+1, indent.by=indent.by), "\n", main.indent, "}")
} else {}
}
if(nchar(slot(object, "elseJS")) > 0) {
# chop off beginning indent strings, otherwiese they ruin the code layout
- elseJS.clean <- gsub(paste("^", indent.by, "*", sep=""), "", slot(object, "elseJS"))
- elseJS <- paste(" else {\n", scnd.indent, elseJS.clean, "\n", main.indent, "}", sep="")
+ elseJS.clean <- gsub(paste0("^", indent.by, "*"), "", slot(object, "elseJS"))
+ elseJS <- paste0(" else {\n", scnd.indent, elseJS.clean, "\n", main.indent, "}")
} else {
# if there is another rk.JS.ite object, call with recursion
if(length(slot(object, "elifJS")) == 1){
- elseJS <- paste(" else ", paste.JS.ite(slot(object, "elifJS")[[1]], level=level, indent.by=indent.by, recurse=TRUE), sep="")
+ elseJS <- paste0(" else ", paste.JS.ite(slot(object, "elifJS")[[1]], level=level, indent.by=indent.by, recurse=TRUE))
} else {
if(isTRUE(empty.e)){
# close for sure with an empty "else"
@@ -808,7 +873,7 @@
}
}
- result <- paste(ifJS, thenJS, elseJS, collapse="", sep="")
+ result <- paste0(ifJS, thenJS, elseJS, collapse="")
return(result)
} ## end function paste.JS.ite()
@@ -832,11 +897,11 @@
funct.start <- ""
funct.end <- ""
} else {
- funct.start <- paste(funct, "(", sep="")
+ funct.start <- paste0(funct, "(")
funct.end <- ")"
}
- JS.array <- paste(
+ JS.array <- paste0(
main.indent, "// define the array ", arr.name, " for values of R option \"", option, "\"\n",
main.indent, "var ", arr.name, " = new Array();\n",
main.indent, arr.name, ".push(",
@@ -844,16 +909,15 @@
main.indent, "// clean array ", arr.name, " from empty strings\n",
main.indent, arr.name, " = ", arr.name, ".filter(String);\n",
main.indent, "// set the actual variable ", opt.name,
- ifelse(identical(option, ""), "", paste(" for R option \"", option, sep="")),
- ifelse(identical(funct, ""), "\"", paste("=", funct, "()\"", sep="")), "\n",
+ ifelse(identical(option, ""), "", paste0(" for R option \"", option)),
+ ifelse(identical(funct, ""), "\"", paste0("=", funct, "()\"")), "\n",
main.indent, "if(", arr.name, ".length > 0) {\n",
scnd.indent, "var ", opt.name, " = \", ",
- ifelse(identical(option, ""), "", paste(option, "=", sep="")),
+ ifelse(identical(option, ""), "", paste0(option, "=")),
funct.start, "\" + ", arr.name, ".join(\", \") + \"",funct.end,"\";\n",
main.indent, "} else {\n",
scnd.indent, "var ", opt.name, " = \"\";\n",
- main.indent, "}\n",
- sep="")
+ main.indent, "}\n")
return(JS.array)
} ## end function paste.JS.array()
@@ -881,16 +945,16 @@
funct.start <- ""
funct.end <- ""
} else {
- funct.start <- paste(funct, "(", sep="")
+ funct.start <- paste0(funct, "(")
funct.end <- ")"
}
# a function to add the object stuff to ite objects
add.opts <- function(this.ite, collapse, array){
if(isTRUE(array)){
- slot(this.ite, "thenJS") <- paste(arr.name, ".push(", slot(this.ite, "thenJS"),");", sep="")
+ slot(this.ite, "thenJS") <- paste0(arr.name, ".push(", slot(this.ite, "thenJS"),");")
} else {
- slot(this.ite, "thenJS") <- paste(variable, " += ", collapse, slot(this.ite, "thenJS"),";", sep="")
+ slot(this.ite, "thenJS") <- paste0(variable, " += ", collapse, slot(this.ite, "thenJS"),";")
}
if(length(slot(this.ite, "elifJS")) == 1){
slot(this.ite, "elifJS") <- list(add.opts(slot(this.ite, "elifJS")[[1]]))
@@ -912,30 +976,28 @@
#return(ifs.pasted)
- JS.options <- paste(
+ JS.options <- paste0(
if(isTRUE(array)){
- paste(
+ paste0(
main.indent, "// define the array ", arr.name, " for values of R option \"", option, "\"\n",
- main.indent, "var ", arr.name, " = new Array();\n", sep="")
+ main.indent, "var ", arr.name, " = new Array();\n")
} else {
- paste(main.indent, "var ", variable, " = \"\";\n", sep="")
+ paste0(main.indent, "var ", variable, " = \"\";\n")
},
- paste(ifs.pasted, sep="", collapse="\n"), "\n",
+ paste0(ifs.pasted, collapse="\n"), "\n",
if(isTRUE(array)){
- paste(
+ paste0(
main.indent, "// clean array ", arr.name, " from empty strings\n",
main.indent, arr.name, " = ", arr.name, ".filter(String);\n",
main.indent, "// set the actual variable ", variable, " with all values for R option \"", option, "\"\n",
main.indent, "if(", arr.name, ".length > 0) {\n",
scnd.indent, "var ", variable, " = \"", collapse,
- ifelse(identical(option, ""), "", paste(option, "=", sep="")),
+ ifelse(identical(option, ""), "", paste0(option, "=")),
funct.start, "\" + ", arr.name, ".join(\", \") + \"",funct.end,"\";\n",
main.indent, "} else {\n",
scnd.indent, "var ", variable, " = \"\";\n",
- main.indent, "}\n",
- sep="")
- } else {},
- sep="")
+ main.indent, "}\n")
+ } else {})
return(JS.options)
} ## end function paste.JS.options()
@@ -985,7 +1047,7 @@
} else {}
if(!identical(join, "")){
- join.code <- paste(".split(\"\\n\").join(\"", join, "\")", sep="")
+ join.code <- paste0(".split(\"\\n\").join(\"", join, "\")")
} else {
join.code <- ""
}
@@ -996,7 +1058,7 @@
if(isTRUE(names.only)){
results <- c(results, camelCode(c(JS.prefix, JS.var)))
} else {
- results <- paste(main.indent, "var ", camelCode(c(JS.prefix, JS.var)), " = ", getter, "(\"", XML.var, "\")", join.code, ";", sep="")
+ results <- paste0(main.indent, "var ", camelCode(c(JS.prefix, JS.var)), " = ", getter, "(\"", XML.var, "\")", join.code, ";")
}
} else {}
if(length(modifiers) > 0){
@@ -1008,8 +1070,8 @@
if(isTRUE(names.only)){
return(camelCode(c(JS.prefix, JS.var, this.modif)))
} else {
- return(paste(main.indent, "var ", camelCode(c(JS.prefix, JS.var, this.modif)),
- " = ", getter, "(\"", XML.var, ".", this.modif, "\")", join.code, ";", sep=""))
+ return(paste0(main.indent, "var ", camelCode(c(JS.prefix, JS.var, this.modif)),
+ " = ", getter, "(\"", XML.var, ".", this.modif, "\")", join.code, ";"))
}
})
if(identical(results, "")){
Modified: trunk/rkward/packages/rkwarddev/R/rk.JS.doc.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.JS.doc.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk.JS.doc.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -51,7 +51,7 @@
if(!is.null(globals)){
js.globals <- paste(
"// define variables globally\n",
- paste(globals, collapse=""), sep="")
+ paste0(globals, collapse=""))
if(!is.null(variables)){
# remove globals from variables, if duplicate
# we'll split them by semicolon
@@ -63,7 +63,7 @@
# leave only variables *not* found in globals
ok.vars <- split.vars[!stripped.vars %in% stripped.globs]
# finally, glue back the semicolon and make one string again
- variables <- gsub("^\n*", "", paste(paste(ok.vars, ";", sep=""), collapse=""))
+ variables <- gsub("^\n*", "", paste(paste0(ok.vars, ";"), collapse=""))
} else {}
} else {
js.globals <- NULL
@@ -82,49 +82,47 @@
}
return(req.result)
}))
- js.preprocess <- paste("function preprocess(){\n",
+ js.preprocess <- paste0("function preprocess(){\n",
indent(2, by=indent.by), "// add requirements etc. here\n",
paste(js.require, collapse=""),
"\n",
- ifelse(is.null(preprocess), "", paste("\n", preprocess, "\n", sep="")),
- "}", sep="")
+ ifelse(is.null(preprocess), "", paste0("\n", preprocess, "\n")),
+ "}")
- js.calculate <- paste("function calculate(){\n",
+ js.calculate <- paste0("function calculate(){\n",
# 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(
+ if(is.null(doPrintout) | !is.null(calculate)){paste0(
+ ifelse(is.null(variables), "", paste0(
indent(2, by=indent.by), "// read in variables from dialog\n",
- paste(variables, collapse=""), "\n\n", sep="")),
+ paste(variables, collapse=""), "\n\n")),
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="")
+ paste0(indent(2, by=indent.by), "// generate the R code to be evaluated here\n"),
+ paste0(indent(2, by=indent.by), "// the R code to be evaluated\n",calculate, "\n")))
+ } else {}, "}")
- js.printout <- paste("function printout(){\n",
+ js.printout <- paste0("function printout(){\n",
if(is.null(doPrintout)){
- paste(
+ paste0(
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, ")\n")), sep="")
+ paste0(indent(2, by=indent.by), echo(id("rk.header(", results.header, ")\n")))
} else {},
"\n",
- ifelse(is.null(printout), echo("rk.print(\"\")\n"), paste("\n", printout, sep="")),
- "\n",
- sep="")
+ ifelse(is.null(printout), echo("rk.print(\"\")\n"), paste0("\n", printout)),
+ "\n")
} else {
rk.paste.JS(
"// all the real work is moved to a custom defined function doPrintout() below",
"// true in this case means: We want all the headers that should be printed in the output:",
"doPrintout(true);",
level=2, indent.by=indent.by)
- }, "\n}", sep="")
+ }, "\n}")
# this part will create preview() and doPrintout(full), if needed
if(is.null(doPrintout)){
js.doPrintout <- ""
} else {
- js.doPrintout <- paste("function preview(){\n",
+ js.doPrintout <- paste0("function preview(){\n",
rk.paste.JS(
"preprocess();",
"calculate();",
@@ -132,9 +130,9 @@
level=2, indent.by=indent.by),
"\n\n",
"function doPrintout(full){\n",
- ifelse(is.null(variables), "", paste(
+ ifelse(is.null(variables), "", paste0(
indent(2, by=indent.by), "// read in variables from dialog\n",
- paste(variables, collapse=""), "\n\n", sep="")),
+ paste(variables, collapse=""), "\n\n")),
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,")\n"))))
@@ -142,10 +140,9 @@
"\n\n",
doPrintout,
if(!is.null(printout)){
- paste("\n\n", indent(2, by=indent.by), "// left over from the printout function\n", printout, "\n\n", sep="")
+ paste0("\n\n", indent(2, by=indent.by), "// left over from the printout function\n", printout, "\n\n")
} else {},
- "\n}",
- sep="")
+ "\n}")
}
JS.doc <- paste(js.gen.info, js.globals, js.preprocess, js.calculate, js.printout, js.doPrintout, sep="\n\n")
Modified: trunk/rkward/packages/rkwarddev/R/rk.JS.saveobj.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.JS.saveobj.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk.JS.saveobj.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -36,8 +36,8 @@
if(!is.null(R.objects)){
num.obj <- length(R.objects)
if(num.obj != num.tags & !identical(R.objects, "initial")){
- stop(simpleError(paste("Length of 'R.objects' (",num.obj,") is unequal to saveobject nodes found:\n ",
- paste(unlist(cleaned.tags), collapse="\n "), sep="")))
+ stop(simpleError(paste0("Length of 'R.objects' (",num.obj,") is unequal to saveobject nodes found:\n ",
+ paste(unlist(cleaned.tags), collapse="\n "))))
} else {}
} else {}
@@ -90,10 +90,10 @@
return(rk.paste.JS(JS.code, level=2, indent.by=indent.by))
})), collapse="\n")
- results <- paste(main.indent, "//// save result object\n",
+ results <- paste0(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="")
+ paste0(main.indent, "// read in saveobject variables\n", JS.vars, "\n")
+ } else {}, main.indent, "// assign object to chosen environment\n", JS.assign)
return(results)
} else {
return(invisible(NULL))
Modified: trunk/rkward/packages/rkwarddev/R/rk.JS.scan.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.JS.scan.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk.JS.scan.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -53,15 +53,15 @@
tag.names=TRUE, only.checkable=TRUE)
if("id" %in% colnames(JS.special.id)){
if(isTRUE(js)){
- JS.lines <- paste(JS.lines, "\n", paste(unlist(sapply(1:nrow(JS.special.id), function(this.id){
+ JS.lines <- paste0(JS.lines, "\n", paste(unlist(sapply(1:nrow(JS.special.id), function(this.id){
return(rk.paste.JS(get.JS.vars(
JS.var=JS.special.id[this.id,"abbrev"],
XML.var=JS.special.id[this.id,"id"],
- tag.name=JS.id[this.id,"tag"],
+ tag.name=JS.special.id[this.id,"tag"],
modifiers="checked",
guess.getter=guess.getter),
level=2, indent.by=indent.by))
- }, USE.NAMES=FALSE)), collapse="\n"), sep="")
+ }, USE.NAMES=FALSE)), collapse="\n"))
} else {
JS.lines <- c(JS.lines, JS.special.id[,"id"])
names(JS.lines) <- NULL
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.browser.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.browser.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.browser.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -23,7 +23,7 @@
if(length(type) == 1 & type %in% c("dir", "file", "savefile")){
attr.list[["type"]] <- type
} else {
- stop(simpleError(paste("Unknown browser type: ", type, sep="")))
+ stop(simpleError(paste0("Unknown browser type: ", type)))
}
if(identical(id.name, "auto")){
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.component.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.component.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.component.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -30,7 +30,7 @@
# once there are more types supported, this will make much more sense...
if(!type %in% c("standard")){
- stop(simpleError(paste("Invalid type: ", type, sep="")))
+ stop(simpleError(paste0("Invalid type: ", type)))
} else {
attr.list[["type"]] <- type
}
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.context.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.context.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.context.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -26,7 +26,7 @@
valid.child("context", children=nodes)
if(!id %in% c("x11", "import")){
- stop(simpleError(paste("Invalid ID: ", id, sep="")))
+ stop(simpleError(paste0("Invalid ID: ", id)))
} else {}
node <- XMLNode("context",
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.convert.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.convert.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.convert.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -49,7 +49,7 @@
stop(simpleError("'mode' must have one (or two, if its a range) named element!"))
} else {}
if(!all(mode.name %in% c("equals","notequals","and","or","min","max"))){
- stop(simpleError(paste("The mode you provided is invalid: ", mode.name, sep="")))
+ stop(simpleError(paste0("The mode you provided is invalid: ", mode.name)))
} else {}
if(length(mode) == 2 & !all(mode.name %in% c("min","max"))){
stop(simpleError("If 'mode' has two elements, they can only be \"min\" and \"max\"!"))
@@ -59,7 +59,7 @@
sourceValsForID <- sapply(sources, function(this.source){
return(check.ID(this.source))
})
- attr.list <- list(id=auto.ids(paste(paste(sourceValsForID, collapse=""), mode, sep=""), prefix=ID.prefix("logic")))
+ attr.list <- list(id=auto.ids(paste0(paste(sourceValsForID, collapse=""), mode), prefix=ID.prefix("logic")))
} else if(!is.null(id.name)){
attr.list <- list(id=id.name)
} else {
@@ -73,8 +73,8 @@
# check these names if they're valid modifiers here
invalid.names <- !src.names %in% unique(unlist(all.valid.modifiers))
if(any(invalid.names)){
- warning(paste("Some of the modifier names you provided are invalid and were ignored: ",
- paste(src.names[invalid.names], collapse=", "), sep=""))
+ warning(paste0("Some of the modifier names you provided are invalid and were ignored: ",
+ paste(src.names[invalid.names], collapse=", ")))
src.names[invalid.names] <- ""
} else {}
sources <- as.character(sapply(1:length(src.names), function(src.no){
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.embed.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.embed.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.embed.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -24,7 +24,7 @@
} else {}
if(identical(id.name, "auto")){
- attr.list[["id"]] <- auto.ids(paste(label, component, sep=""), prefix=ID.prefix("embed"))
+ attr.list[["id"]] <- auto.ids(paste0(label, component), prefix=ID.prefix("embed"))
} else {
attr.list[["id"]] <- id.name
}
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.entry.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.entry.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.entry.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -26,7 +26,7 @@
if(inherits(component, "XiMpLe.node")){
node.name <- slot(component ,"name")
if(!identical(node.name, "component")){
- stop(simpleError(paste("Invalid XML node for 'entry': ", node.name, sep="")))
+ stop(simpleError(paste0("Invalid XML node for 'entry': ", node.name)))
} else {}
} else {}
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.formula.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.formula.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.formula.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -27,7 +27,7 @@
if(inherits(this.attr, "XiMpLe.node")){
this.attr.name <- slot(this.attr ,"name")
if(!identical(this.attr.name, "varslot")){
- stop(simpleError(paste("'fixed' and 'dependent' must be <varslot> nodes! You provided: <", this.attr.name, ">", sep="")))
+ stop(simpleError(paste0("'fixed' and 'dependent' must be <varslot> nodes! You provided: <", this.attr.name, ">")))
} else {}
} else {}
})
@@ -36,7 +36,7 @@
depnd.id <- check.ID(dependent)
if(identical(id.name, "auto")){
- attr.list <- list(id=auto.ids(paste(fixed.id, depnd.id, sep=""), prefix=ID.prefix("formula")))
+ attr.list <- list(id=auto.ids(paste0(fixed.id, depnd.id), prefix=ID.prefix("formula")))
} else if(!is.null(id.name)){
attr.list <- list(id=id.name)
} else {
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.insert.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.insert.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.insert.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -27,7 +27,7 @@
if(inherits(snippet, "XiMpLe.node")){
node.name <- slot(snippet, "name")
if(!identical(node.name, "snippet")){
- stop(simpleError(paste("Invalid XML node, must be a snippet: ", node.name, sep="")))
+ stop(simpleError(paste0("Invalid XML node, must be a snippet: ", node.name)))
} else {}
} else {}
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.matrix.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.matrix.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.matrix.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -48,7 +48,7 @@
attr.list <- list(id=check.ID(id.name), label=label)
if(!mode %in% c("integer", "real", "string")){
- stop(simpleError(paste("Invalid mode: ", mode, sep="")))
+ stop(simpleError(paste0("Invalid mode: ", mode)))
} else {
attr.list[["mode"]] <- mode
}
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.plugin.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.plugin.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.plugin.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -57,10 +57,10 @@
all.children[[length(all.children)+1]] <- generator.info
} else {}
- all.children[[length(all.children)+1]] <- rk.XML.code(file=paste(name, ".js", sep=""))
+ all.children[[length(all.children)+1]] <- rk.XML.code(file=paste0(name, ".js"))
if(isTRUE(help)){
- all.children[[length(all.children)+1]] <- rk.XML.help(file=paste(name, ".rkh", sep=""))
+ all.children[[length(all.children)+1]] <- rk.XML.help(file=paste0(name, ".rkh"))
} else {}
if(!is.null(pluginmap)){
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.pluginmap.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.pluginmap.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.pluginmap.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -133,7 +133,7 @@
label=xml.basename,
file=this.comp,
# if this ID get's a change, also change it in rk.plugin.skeleton(show=TRUE)!
- id.name=auto.ids(paste(name, xml.basename, sep=""), prefix=ID.prefix("component"), chars=25))
+ id.name=auto.ids(paste0(name, xml.basename), prefix=ID.prefix("component"), chars=25))
}
components.XML <- rk.XML.components(components.XML.list)
@@ -199,7 +199,7 @@
entry.XML <- rk.XML.menu(
label=name.orig,
rk.XML.entry(component=this.comp),
- id.name=auto.ids(paste(name, this.comp, sep=""), prefix=ID.prefix("menu"), chars=12))
+ id.name=auto.ids(paste0(name, this.comp), prefix=ID.prefix("menu"), chars=12))
if(this.hier %in% names(main.menu)){
hier.XML <- rk.XML.menu(
@@ -260,7 +260,7 @@
}
# clean the ID of dots and append "_rkward"
- doc.ID.name <- paste(gsub("[.]*", "", name), "_rkward", sep="")
+ doc.ID.name <- paste0(gsub("[.]*", "", name), "_rkward")
# check for empty "namespace" value
if(is.null(namespace)){
namespace <- "rkward"
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.snippets.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.snippets.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.snippets.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -25,7 +25,7 @@
stopifnot(inherits(this.node, "XiMpLe.node"))
node.name <- slot(this.node, "name")
if(!node.name %in% c("snippet", "!--")){
- stop(simpleError(paste("Invalid XML nodes for snippets section: ", node.name, sep="")))
+ stop(simpleError(paste0("Invalid XML nodes for snippets section: ", node.name)))
} else {}
})
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.varslot.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.varslot.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.varslot.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -41,7 +41,7 @@
if(inherits(source, "XiMpLe.node")){
source.name <- slot(source, "name")
if(!identical(source.name, "varselector")){
- stop(simpleError(paste("'source' must be a <varselector> node! You provided: <", source.name, ">", sep="")))
+ stop(simpleError(paste0("'source' must be a <varselector> node! You provided: <", source.name, ">")))
} else {}
} else {}
@@ -62,7 +62,7 @@
valid.types <- c("unknown", "number", "string", "factor", "invalid")
invalid.type <- !types %in% valid.types
if(invalid.type){
- warning(paste("You provided invalid types for varslot, they were ignored: ", paste(types, collapse=", "), sep=""))
+ warning(paste0("You provided invalid types for varslot, they were ignored: ", paste(types, collapse=", ")))
types <- ""
} else {}
var.slot.attr[["types"]] <- paste(types, collapse=" ")
Modified: trunk/rkward/packages/rkwarddev/R/rk.build.plugin.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.build.plugin.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk.build.plugin.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -28,22 +28,22 @@
}
plugin.name <- as.character(plugin.desc[,"Package"])
plugin.version <- as.character(plugin.desc[,"Version"])
- pckg.basename <- paste(plugin.name, "_", plugin.version, sep="")
- pckg.name.src <- paste(pckg.basename, ".tar.gz", sep="")
+ pckg.basename <- paste0(plugin.name, "_", plugin.version)
+ pckg.name.src <- paste0(pckg.basename, ".tar.gz")
package.path <- file.path(build.path, pckg.name.src)
R.bin <- R.home(file.path("bin","R"))
if(isTRUE(check)){
# check for examples check file before
- chk.ex.file <- file.path(plugin.path, paste(plugin.name, "-Ex.R", sep=""))
+ chk.ex.file <- file.path(plugin.path, paste0(plugin.name, "-Ex.R"))
chk.ex.file.present <- ifelse(file_test("-f", chk.ex.file), TRUE, FALSE)
tryCatch(chk.out.dir <- tempdir(), error=function(e) stop(e))
setwd(chk.out.dir)
- set.R.libs <- ifelse(is.null(R.libs), "", paste("R_LIBS_USER=", R.libs, " ; ", sep=""))
- r.cmd.check.call <- paste(set.R.libs, R.bin, " CMD check ", plugin.path, " || exit 1", sep="")
- message(paste("check: calling R CMD check, this might take a while...", sep=""))
+ set.R.libs <- ifelse(is.null(R.libs), "", paste0("R_LIBS_USER=", R.libs, " ; "))
+ r.cmd.check.call <- paste0(set.R.libs, R.bin, " CMD check ", plugin.path, " || exit 1")
+ message(paste0("check: calling R CMD check, this might take a while..."))
print(system(r.cmd.check.call, intern=TRUE))
- on.exit(message(paste("check: results were saved to ", chk.out.dir, "/", plugin.name, ".Rcheck", sep="")), add=TRUE)
+ on.exit(message(paste0("check: results were saved to ", chk.out.dir, "/", plugin.name, ".Rcheck")), add=TRUE)
setwd(jmp.back)
# need to clean up?
if(!isTRUE(chk.ex.file.present) & file_test("-f", chk.ex.file)){
@@ -53,9 +53,9 @@
} else {}
setwd(build.path)
- r.cmd.build.call <- paste(R.bin, " CMD build --no-vignettes ", plugin.path, " || exit 1", sep="")
+ r.cmd.build.call <- paste0(R.bin, " CMD build --no-vignettes ", plugin.path, " || exit 1")
system(r.cmd.build.call, intern=TRUE)
- message(paste("build: package built as ", package.path, sep=""))
+ message(paste0("build: package built as ", package.path))
if(isTRUE(install)){
install.packages(package.path, lib=R.libs, repos=NULL)
Modified: trunk/rkward/packages/rkwarddev/R/rk.paste.JS.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.paste.JS.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk.paste.JS.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -62,16 +62,16 @@
result <- slot(this.object, "value")
} else if(is.XiMpLe.node(this.object)){
if(identical(XMLName(this.object), "!--")){
- result <- paste(indent(level, by=indent.by),
+ result <- paste0(indent(level, by=indent.by),
"// ",
- gsub("\n", paste("\n", indent(level, by=indent.by), "//", sep=""), XMLValue(XMLChildren(this.object)[[1]])), sep="")
+ gsub("\n", paste0("\n", indent(level, by=indent.by), "//"), XMLValue(XMLChildren(this.object)[[1]])))
} else {
stop(simpleError("XiMpLe.node objects are only valid if they are comments!"))
}
} else {
# chop off beginning indent strings, otherwiese they ruin the code layout
- this.object <- gsub(paste("^", indent.by, "*", sep=""), "", this.object)
- result <- paste(indent(level, by=indent.by), this.object, sep="")
+ this.object <- gsub(paste0("^", indent.by, "*"), "", this.object)
+ result <- paste0(indent(level, by=indent.by), this.object)
}
return(result)
}), collapse="\n")
Modified: trunk/rkward/packages/rkwarddev/R/rk.plotOptions.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.plotOptions.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk.plotOptions.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -40,7 +40,7 @@
rk.plotOptions <- function(label="Generic plot options", embed="rkward::plot_options", button=TRUE, id.name="auto"){
if(identical(id.name, "auto")){
- id.name <- auto.ids(paste(embed, label, sep=""), prefix=ID.prefix("embed"), chars=12)
+ id.name <- auto.ids(paste0(embed, label), prefix=ID.prefix("embed"), chars=12)
} else {}
genPlotOpts.XML <- rk.XML.embed(component=embed, button=button, label=label, id.name=id.name)
Modified: trunk/rkward/packages/rkwarddev/R/rk.plugin.component.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.plugin.component.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk.plugin.component.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -141,15 +141,14 @@
} else {}
}
if(!"results.header" %in% got.JS.options) {
- js[["results.header"]] <- paste("\"", name.orig, " results\"", sep="")
+ js[["results.header"]] <- paste0("\"", name.orig, " results\"")
} else {}
if("var" %in% scan){
var.scanned <- rk.JS.scan(XML.plugin, guess.getter=guess.getter)
if(!is.null(var.scanned)){
- js[["variables"]] <- paste(
- ifelse(is.null(js[["variables"]]), "", paste(js[["variables"]], "\n", sep="")),
- var.scanned,
- sep="")
+ js[["variables"]] <- paste0(
+ ifelse(is.null(js[["variables"]]), "", paste0(js[["variables"]], "\n")),
+ var.scanned)
} else {}
} else {}
if("saveobj" %in% scan){
Modified: trunk/rkward/packages/rkwarddev/R/rk.plugin.skeleton.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.plugin.skeleton.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk.plugin.skeleton.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -175,7 +175,7 @@
rkward.dir <- file.path(main.dir, "inst", "rkward")
plugin.dir <- file.path(rkward.dir, "plugins")
# the basic file names
- plugin.fname.pluginmap <- paste(name, ".pluginmap", sep="")
+ plugin.fname.pluginmap <- paste0(name, ".pluginmap")
# file names with paths
plugin.pluginmap <- file.path(rkward.dir, plugin.fname.pluginmap)
tests.main.dir <- file.path(rkward.dir, "tests")
@@ -186,23 +186,23 @@
# create it, if necessary
if(!file_test("-d", main.dir)){
stopifnot(dir.create(main.dir, recursive=TRUE))
- message(paste("Created directory ", main.dir, ".", sep=""))
+ message(paste0("Created directory ", main.dir, "."))
} else {}
# create empty R directory, e.g. for smooth roxyPackage runs
if(!file_test("-d", R.dir)){
stopifnot(dir.create(R.dir, recursive=TRUE))
- message(paste("Created directory ", R.dir, ".", sep=""))
+ message(paste0("Created directory ", R.dir, "."))
} else {}
# create directory structure
if(!file_test("-d", plugin.dir)){
stopifnot(dir.create(plugin.dir, recursive=TRUE))
- message(paste("Created directory ", plugin.dir, ".", sep=""))
+ message(paste0("Created directory ", plugin.dir, "."))
} else {}
if(isTRUE(tests) & !file_test("-d", tests.dir)){
stopifnot(dir.create(tests.dir, recursive=TRUE))
- message(paste("Created directory ", tests.dir, ".", sep=""))
+ message(paste0("Created directory ", tests.dir, "."))
} else {}
## create the main component
@@ -223,7 +223,7 @@
scan=scan,
guess.getter=guess.getter,
hierarchy=pluginmap[["hierarchy"]],
- pluginmap=paste("../", name, ".pluginmap", sep=""),
+ pluginmap=paste0("../", name, ".pluginmap"),
create=create[create %in% c("xml", "js", "rkh")],
gen.info=gen.info,
indent.by=indent.by)
@@ -241,9 +241,9 @@
rkh.doc <- slot(this.comp, "rkh")
# the basic file names
- plugin.fname.xml <- paste(comp.name, ".xml", sep="")
- plugin.fname.js <- paste(comp.name, ".js", sep="")
- plugin.fname.rkh <- paste(comp.name, ".rkh", sep="")
+ plugin.fname.xml <- paste0(comp.name, ".xml")
+ plugin.fname.js <- paste0(comp.name, ".js")
+ plugin.fname.rkh <- paste0(comp.name, ".rkh")
# file names with paths
plugin.xml <- file.path(plugin.dir, plugin.fname.xml)
plugin.js <- file.path(plugin.dir, plugin.fname.js)
@@ -293,7 +293,7 @@
# get components and hierarchy info from the components list
all.components <- sapply(components, function(this.comp){
comp.name <- slot(this.comp, "name")
- named.compo <- paste("plugins/", clean.name(comp.name), ".xml", sep="")
+ named.compo <- paste0("plugins/", clean.name(comp.name), ".xml")
# we'll name the component, to nicen the menu entry
names(named.compo) <- comp.name
return(named.compo)
@@ -325,8 +325,8 @@
rk.load.pluginmaps(plugin.pluginmap)
if(isTRUE(show)){
# call the plugin; reconstructed the ID generation from rk.XML.pluginmap()
- plugin.ID <- auto.ids(paste(pm.id.name, pm.id.name, sep=""), prefix=ID.prefix("component"), chars=25)
- rk.call.plugin(paste("rkward::", plugin.ID, sep=""))
+ plugin.ID <- auto.ids(paste0(pm.id.name, pm.id.name), prefix=ID.prefix("component"), chars=25)
+ rk.call.plugin(paste0("rkward::", plugin.ID))
} else {}
} else {}
} else {}
@@ -390,17 +390,17 @@
# create empty NAMESPACE file for R 2.14 compatibility
if(!file_test("-f", namespace.file)){
cat("", file=namespace.file)
- message(paste("Created empty file ", namespace.file, " for R 2.14 compatibility.", sep=""))
+ message(paste0("Created empty file ", namespace.file, " for R 2.14 compatibility."))
} else {}
} else {}
## create ChangeLog file (if none exists)
if("clog" %in% create){
if(isTRUE(checkCreateFiles(changelog.file, ow=FALSE, action="clog"))){
- changelog.text <- paste("ChangeLog for package ", name,
+ changelog.text <- paste0("ChangeLog for package ", name,
"\n\nChanges in version ", slot(about.node, "attributes")[["version"]],
" (", slot(about.node, "attributes")[["releasedate"]],")",
- "\nChanges:\n - initial package build\nAdded:\n - added a ChangeLog file\nFixed:\n - ...\n", sep="")
+ "\nChanges:\n - initial package build\nAdded:\n - added a ChangeLog file\nFixed:\n - ...\n")
cat(changelog.text, file=changelog.file)
} else {}
if(isTRUE(edit)){
Modified: trunk/rkward/packages/rkwarddev/R/rk.rkh.link.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.rkh.link.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk.rkh.link.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -25,11 +25,11 @@
text <- ifelse(is.null(text), href, text)
link <- href
} else if(identical(type, "R")){
- link <- paste("rkward://rhelp/", href, sep="")
+ link <- paste0("rkward://rhelp/", href)
} else if(identical(type, "RK")){
- link <- paste("rkward://component/", href, sep="")
+ link <- paste0("rkward://component/", href)
} else {
- stop(simpleError(paste("Invalid type for link node:", type, sep="")))
+ stop(simpleError(paste0("Invalid type for link node:", type)))
}
if(is.null(text)){
Modified: trunk/rkward/packages/rkwarddev/R/rk.rkh.related.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.rkh.related.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk.rkh.related.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -18,7 +18,7 @@
# check the node names and allow only valid ones
li.elements <- sapply(child.list(links), function(this.node){
if(!identical(slot(this.node, "name"), "link")){
- stop(simpleError(paste("Invalid XML nodes for links section: ", this.node at name, sep="")))
+ stop(simpleError(paste0("Invalid XML nodes for links section: ", this.node at name)))
} else {
li.element <- XMLNode("li", .children=child.list(this.node, empty=FALSE))
}
Modified: trunk/rkward/packages/rkwarddev/R/rk.testsuite.doc.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.testsuite.doc.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rk.testsuite.doc.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -6,7 +6,7 @@
#' @export
rk.testsuite.doc <- function(name=NULL){
- suite.text <- paste("## definition of the test suite
+ suite.text <- paste0("## definition of the test suite
suite <- new(\"RKTestSuite\",
id=\"", name ,"\",
## needed packages
@@ -52,7 +52,7 @@
# rm(list=c(\"earlier.results\"), envir=globalenv())
}
)
- )", sep="")
+ )")
return(suite.text)
}
Modified: trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -4,7 +4,7 @@
#' Package: \tab rkwarddev\cr
#' Type: \tab Package\cr
#' Version: \tab 0.06-2\cr
-#' Date: \tab 2013-02-25\cr
+#' Date: \tab 2013-03-10\cr
#' Depends: \tab R (>= 2.9.0),methods,XiMpLe (>= 0.03-18),rkward (>= 0.5.6)\cr
#' Enhances: \tab rkward\cr
#' Encoding: \tab UTF-8\cr
Modified: trunk/rkward/packages/rkwarddev/R/tf.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/tf.R 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/R/tf.R 2013-03-10 22:08:35 UTC (rev 4579)
@@ -41,7 +41,7 @@
if(inherits(cbox, "XiMpLe.node")){
node.name <- cbox at name
if(!identical(node.name, "checkbox")){
- stop(simpleError(paste("Invalid XML node, expected 'checkbox' and got: ", node.name, sep="")))
+ stop(simpleError(paste0("Invalid XML node, expected 'checkbox' and got: ", node.name)))
} else {}
} else {
stop(simpleError("'cbox' must be of class XiMpLe.node!"))
@@ -53,13 +53,13 @@
opt.name <- opt
}
- full.prefix <- paste(prefix, indent(level=level, by=indent.by), sep="")
+ full.prefix <- paste0(prefix, indent(level=level, by=indent.by))
# check for negation
inverse <- ifelse(not, "!", "")
result <- ite(id(inverse, cbox),
- echo(paste(full.prefix, opt.name, "=", true, sep="")),
- ifelse(ifelse, echo(paste(full.prefix, opt.name, "=", false, sep="")), "")
+ echo(paste0(full.prefix, opt.name, "=", true)),
+ ifelse(ifelse, echo(paste0(full.prefix, opt.name, "=", false)), "")
)
return(result)
}
Modified: trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd 2013-03-10 16:52:07 UTC (rev 4578)
+++ trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd 2013-03-10 22:08:35 UTC (rev 4579)
@@ -9,7 +9,7 @@
\details{
\tabular{ll}{ Package: \tab rkwarddev\cr Type: \tab
Package\cr Version: \tab 0.06-2\cr Date: \tab
- 2013-02-25\cr Depends: \tab R (>= 2.9.0),methods,XiMpLe
+ 2013-03-10\cr Depends: \tab R (>= 2.9.0),methods,XiMpLe
(>= 0.03-18),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
More information about the rkward-tracker
mailing list