[Roxygen-commits] r81 - in pkg: R sandbox

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jul 24 06:37:17 CEST 2008


Author: pcd
Date: 2008-07-24 06:37:17 +0200 (Thu, 24 Jul 2008)
New Revision: 81

Modified:
   pkg/R/namespace.R
   pkg/sandbox/example-S4-person.R
Log:
honest exportation of S4


Modified: pkg/R/namespace.R
===================================================================
--- pkg/R/namespace.R	2008-07-24 04:36:41 UTC (rev 80)
+++ pkg/R/namespace.R	2008-07-24 04:37:17 UTC (rev 81)
@@ -39,11 +39,11 @@
   parse.export <- function(proc, parms) {
     if (is.null.string(parms)) {
       if (!is.null(exportee$S4method))
-        parse.exportMethod(exportee$S4method)
+        parse.exportMethod(NULL, exportee$S4method)
       else if (!is.null(exportee$S4class))
-        parse.exportClass(exportee$S4class)
-      else if (!is.null(exportee$S4method))
-        parse.exportMethod(exportee$S4method)
+        parse.exportClass(NULL, exportee$S4class)
+      else if (!is.null(exportee$S4generic))
+        parse.exportMethod(NULL, exportee$S4generic)
       else {
         exportee <- first.non.null(exportee$name,
                                    exportee$assignee)
@@ -52,6 +52,8 @@
         else
           parse.directive('export', exportee)
       }
+    } else {
+      parse.directive('export', parms)
     }
   }
 

Modified: pkg/sandbox/example-S4-person.R
===================================================================
--- pkg/sandbox/example-S4-person.R	2008-07-24 04:36:41 UTC (rev 80)
+++ pkg/sandbox/example-S4-person.R	2008-07-24 04:37:17 UTC (rev 81)
@@ -8,7 +8,7 @@
 #' @slot birthyear The year of birth
 #' @prototype Prototype person is named John Doe
 #'      and born in the year 1971
-#' @exportClass Person
+#' @export
 setClass('Person',
          representation=
          representation(fullname='character',
@@ -22,7 +22,7 @@
 #' @param birthyear The year of birth.
 #' @returnType Person
 #' @return The Person object
-#' @exportMethod Person
+#' @export
 Person <- function(fullname, birthyear) {
   return(new('Person', fullname=fullname, birthyear=birthyear))
 }
@@ -35,7 +35,7 @@
 #' Name a person, the baptism.
 #'
 #' @param object A Person object
-#' @exportMethod name
+#' @export
 setMethod('name', 'Person',
 function(object) {
   return(object at fullname)



More information about the Roxygen-commits mailing list