[rkward-cvs] SF.net SVN: rkward:[3852] trunk/rkward/rkward/rbackend/rpackages/XiMpLe
m-eik at users.sourceforge.net
m-eik at users.sourceforge.net
Tue Sep 27 20:39:46 UTC 2011
Revision: 3852
http://rkward.svn.sourceforge.net/rkward/?rev=3852&view=rev
Author: m-eik
Date: 2011-09-27 20:39:46 +0000 (Tue, 27 Sep 2011)
Log Message:
-----------
XiMpLe: changed default 'shine' value, and the paste functions now automatically call each other depending on object class
Modified Paths:
--------------
trunk/rkward/rkward/rbackend/rpackages/XiMpLe/ChangeLog
trunk/rkward/rkward/rbackend/rpackages/XiMpLe/DESCRIPTION
trunk/rkward/rkward/rbackend/rpackages/XiMpLe/R/XiMpLe-package.R
trunk/rkward/rkward/rbackend/rpackages/XiMpLe/R/pasteXMLNode.R
trunk/rkward/rkward/rbackend/rpackages/XiMpLe/R/pasteXMLTree.R
trunk/rkward/rkward/rbackend/rpackages/XiMpLe/man/XiMpLe-package.Rd
trunk/rkward/rkward/rbackend/rpackages/XiMpLe/man/pasteXMLNode.Rd
trunk/rkward/rkward/rbackend/rpackages/XiMpLe/man/pasteXMLTree.Rd
Modified: trunk/rkward/rkward/rbackend/rpackages/XiMpLe/ChangeLog
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/XiMpLe/ChangeLog 2011-09-27 17:18:19 UTC (rev 3851)
+++ trunk/rkward/rkward/rbackend/rpackages/XiMpLe/ChangeLog 2011-09-27 20:39:46 UTC (rev 3852)
@@ -1,6 +1,9 @@
ChangeLog for package XiMpLe
-## 0.03-3 (2011-09-26)
+## 0.03-3 (2011-09-27)
+ - changed default 'shine' value of pasteXMLNode() and pasteXMLTree() from 2 to 1
+ - pasteXMLNode() and pasteXMLTree() now try to call each other if fed with the wrong class object,
+ but a warning is given
- changed handling of 'value' in pasteXMLNode(), now reflects 'shine' setting/indentation
## 0.03-2 (2011-09-17)
Modified: trunk/rkward/rkward/rbackend/rpackages/XiMpLe/DESCRIPTION
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/XiMpLe/DESCRIPTION 2011-09-27 17:18:19 UTC (rev 3851)
+++ trunk/rkward/rkward/rbackend/rpackages/XiMpLe/DESCRIPTION 2011-09-27 20:39:46 UTC (rev 3852)
@@ -20,7 +20,7 @@
Authors at R: c(person(given="Meik", family="Michalke",
email="meik.michalke at hhu.de", role=c("aut", "cre")))
Version: 0.03-3
-Date: 2011-09-26
+Date: 2011-09-27
Collate:
'XiMpLe.node-class.R'
'XiMpLe.doc-class.R'
Modified: trunk/rkward/rkward/rbackend/rpackages/XiMpLe/R/XiMpLe-package.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/XiMpLe/R/XiMpLe-package.R 2011-09-27 17:18:19 UTC (rev 3851)
+++ trunk/rkward/rkward/rbackend/rpackages/XiMpLe/R/XiMpLe-package.R 2011-09-27 20:39:46 UTC (rev 3852)
@@ -4,7 +4,7 @@
#' Package: \tab XiMpLe\cr
#' Type: \tab Package\cr
#' Version: \tab 0.03-3\cr
-#' Date: \tab 2011-09-26\cr
+#' Date: \tab 2011-09-27\cr
#' Depends: \tab R (>= 2.9.0),methods\cr
#' Enhances: \tab rkward\cr
#' Encoding: \tab UTF-8\cr
Modified: trunk/rkward/rkward/rbackend/rpackages/XiMpLe/R/pasteXMLNode.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/XiMpLe/R/pasteXMLNode.R 2011-09-27 17:18:19 UTC (rev 3851)
+++ trunk/rkward/rkward/rbackend/rpackages/XiMpLe/R/pasteXMLNode.R 2011-09-27 20:39:46 UTC (rev 3852)
@@ -11,9 +11,15 @@
#' @param indent.by A charachter string defining how indentation should be done. Defaults to tab.
#' @include XiMpLe.node-class.R
#' @export
-pasteXMLNode <- function(node, level=1, shine=2, indent.by="\t"){
+pasteXMLNode <- function(node, level=1, shine=1, indent.by="\t"){
if(!inherits(node, "XiMpLe.node")){
- stop(simpleError("'node' must be of class XiMpLe.node!"))
+ if(inherits(node, "XiMpLe.doc")){
+ # hand over to pasteXMLTree()
+ warning("'node' is of class XiMpLe.doc, called pasteXMLTree() instead.")
+ return(pasteXMLTree(obj=node, shine=shine, indent.by=indent.by))
+ } else {
+ stop(simpleError("'node' must be of class XiMpLe.node!"))
+ }
} else {}
new.indent <- ifelse(shine > 0, indent(level+1, by=indent.by), "")
Modified: trunk/rkward/rkward/rbackend/rpackages/XiMpLe/R/pasteXMLTree.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/XiMpLe/R/pasteXMLTree.R 2011-09-27 17:18:19 UTC (rev 3851)
+++ trunk/rkward/rkward/rbackend/rpackages/XiMpLe/R/pasteXMLTree.R 2011-09-27 20:39:46 UTC (rev 3852)
@@ -10,9 +10,15 @@
#' @param indent.by A charachter string defining how indentation should be done. Defaults to tab.
#' @include XiMpLe.doc-class.R
#' @export
-pasteXMLTree <- function(obj, shine=2, indent.by="\t"){
+pasteXMLTree <- function(obj, shine=1, indent.by="\t"){
if(!inherits(obj, "XiMpLe.doc")){
- stop(simpleError("'obj' must be of class XiMpLe.doc!"))
+ if(inherits(obj, "XiMpLe.node")){
+ # hand over to pasteXMLNode()
+ warning("'node' is of class XiMpLe.node, called pasteXMLNode() instead.")
+ return(pasteXMLNode(node=obj, shine=shine, indent.by=indent.by))
+ } else {
+ stop(simpleError("'obj' must be of class XiMpLe.doc!"))
+ }
} else {}
filename <- slot(obj, "file")
Modified: trunk/rkward/rkward/rbackend/rpackages/XiMpLe/man/XiMpLe-package.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/XiMpLe/man/XiMpLe-package.Rd 2011-09-27 17:18:19 UTC (rev 3851)
+++ trunk/rkward/rkward/rbackend/rpackages/XiMpLe/man/XiMpLe-package.Rd 2011-09-27 20:39:46 UTC (rev 3852)
@@ -9,7 +9,7 @@
\details{
\tabular{ll}{ Package: \tab XiMpLe\cr Type: \tab
Package\cr Version: \tab 0.03-3\cr Date: \tab
- 2011-09-26\cr Depends: \tab R (>= 2.9.0),methods\cr
+ 2011-09-27\cr Depends: \tab R (>= 2.9.0),methods\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 }
Modified: trunk/rkward/rkward/rbackend/rpackages/XiMpLe/man/pasteXMLNode.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/XiMpLe/man/pasteXMLNode.Rd 2011-09-27 17:18:19 UTC (rev 3851)
+++ trunk/rkward/rkward/rbackend/rpackages/XiMpLe/man/pasteXMLNode.Rd 2011-09-27 20:39:46 UTC (rev 3852)
@@ -2,7 +2,7 @@
\alias{pasteXMLNode}
\title{Paste an XML node from a XiMpLe.node object}
\usage{
- pasteXMLNode(node, level = 1, shine = 2, indent.by =
+ pasteXMLNode(node, level = 1, shine = 1, indent.by =
"\t")
}
\arguments{
Modified: trunk/rkward/rkward/rbackend/rpackages/XiMpLe/man/pasteXMLTree.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/XiMpLe/man/pasteXMLTree.Rd 2011-09-27 17:18:19 UTC (rev 3851)
+++ trunk/rkward/rkward/rbackend/rpackages/XiMpLe/man/pasteXMLTree.Rd 2011-09-27 20:39:46 UTC (rev 3852)
@@ -2,7 +2,7 @@
\alias{pasteXMLTree}
\title{Paste an XML tree structure from a XiMpLe.doc object}
\usage{
- pasteXMLTree(obj, shine = 2, indent.by = "\t")
+ pasteXMLTree(obj, shine = 1, indent.by = "\t")
}
\arguments{
\item{obj}{An object of class \code{XiMpLe.doc}.}
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