[Rmesquite-commits] r23 - in pkg: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Dec 24 19:38:54 CET 2009


Author: hlapp
Date: 2009-12-24 19:38:54 +0100 (Thu, 24 Dec 2009)
New Revision: 23

Modified:
   pkg/DESCRIPTION
   pkg/R/objects.R
Log:
Fixed S3 generics inconsistencies. Added SystemRequirements to DESCRIPTION.


Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2009-12-22 00:10:49 UTC (rev 22)
+++ pkg/DESCRIPTION	2009-12-24 18:38:54 UTC (rev 23)
@@ -1,14 +1,15 @@
 Package: RMesquite
 Version: 0.5-0
-Date: 2009-12-03
+Date: 2009-12-22
 Title: Wrapper for Mesquite methods in R
 Author: Hilmar Lapp <hlapp at drycafe.net>, and Wayne Maddison <wmaddisn at interchange.ubc.ca>.
 Maintainer: Hilmar Lapp <hlapp at drycafe.net>
 Depends: R (>= 2.6.0), rJava, ape
+SystemRequirements: Mesquite (http://mesquiteproject.org)
 Suggests: 
 Description: Provides a transparent wrapper for Mesquite functions in
     R. Mesquite is a modular system for evolutionary analysis in
     Java. Mesquite is available from http://mesquiteproject.org.
 License: GPL (>= 2)
 URL: http://rmesquite.r-forge.r-project.org, http://mesquiteproject.org
-Packaged: 2009-12-03; wmaddisn
+Packaged: 2009-12-22; hlapp

Modified: pkg/R/objects.R
===================================================================
--- pkg/R/objects.R	2009-12-22 00:10:49 UTC (rev 22)
+++ pkg/R/objects.R	2009-12-24 18:38:54 UTC (rev 23)
@@ -169,29 +169,29 @@
   ans  
 }
 
-as.matrix.jobjRef <- function(from) {
-  if (class(from) != "jobjRef") {
-    stop("need to pass java object reference, not ",class(from));
+as.matrix.jobjRef <- function(x, ...) {
+  if (class(x) != "jobjRef") {
+    stop("need to pass java object reference, not ",class(x));
   }
-  cl.name <- .jclassOf(from,package.path=FALSE);
+  cl.name <- .jclassOf(x,package.path=FALSE);
   if (cl.name == "RNumericMatrix") {
-    return(from.RNumericMatrix(from));
+    return(from.RNumericMatrix(x));
   }
   if (cl.name %in% c("CategoricalData","ContinuousData","DNAData","MeristicData")) {
-    return(from.CharacterMatrix(from,class.name=cl.name));
+    return(from.CharacterMatrix(x,class.name=cl.name));
   }
-  stop("currently not supported for objects of class ",.jclassOf(from));
+  stop("currently not supported for objects of class ",.jclassOf(x));
 }
 
-as.phylo.jobjRef <- function(from) {
-  if (.jclassOf(from,package.path=FALSE) != "MesquiteTree") {
-    stop("can't coerce Java object of type ",.jclassOf(from)," to type phylo");
+as.phylo.jobjRef <- function(x, ...) {
+  if (.jclassOf(x,package.path=FALSE) != "MesquiteTree") {
+    stop("can't coerce Java object of type ",.jclassOf(x)," to type phylo");
   }
-  mRoot <- .jcall(from,"I","getRoot");
-  numNodes <- .jcall(from,"I","numberOfNodesInClade",mRoot);
-  numTerminals <- .jcall(from,"I","numberOfTerminalsInClade",mRoot);
+  mRoot <- .jcall(x,"I","getRoot");
+  numNodes <- .jcall(x,"I","numberOfNodesInClade",mRoot);
+  numTerminals <- .jcall(x,"I","numberOfTerminalsInClade",mRoot);
   mAPE <- .jnew("mesquite/R/common/APETree",
-                .jcast(from,"mesquite/lib/Tree"));
+                .jcast(x,"mesquite/lib/Tree"));
   edge.matrix <- .jcall(mAPE,"[[I","getEdgeMatrix");
   phylo <- list(edge=matrix(
                   c(.jevalArray(edge.matrix[[1]]),



More information about the Rmesquite-commits mailing list