Rename file
authorPaul Hoffman <phoffman@nygenome.org>
Thu, 2 Nov 2017 20:00:26 +0000 (16:00 -0400)
committerPaul Hoffman <phoffman@nygenome.org>
Thu, 2 Nov 2017 20:00:26 +0000 (16:00 -0400)
DESCRIPTION
R/S4.R [new file with mode: 0644]
R/internal.R [deleted file]

index 1455bab576c1526cdeb45091a616b8275b2962eb..1a74e9aadc8dce3c2dc1a026fda13e4dec4a2876 100644 (file)
@@ -18,8 +18,8 @@ Imports:
   iterators,
   itertools
 Collate:
+  'S4.R'
   'loom.R'
-  'internal.R'
 License: GPL-3
 Encoding: UTF-8
 LazyData: true
diff --git a/R/S4.R b/R/S4.R
new file mode 100644 (file)
index 0000000..6584e17
--- /dev/null
+++ b/R/S4.R
@@ -0,0 +1,30 @@
+#' @import R6
+#' @importFrom methods setOldClass
+NULL
+
+.onLoad <- function(libname, pkgname) {
+  setOldClass(Classes = 'loom')
+}
+
+.onAttach <- function(libname, pkgname) {
+  .onLoad(libname = libname, pkgname = pkgname)
+}
+
+# # Examples setting S4 methods for R6 classes
+# # Requires the setOldClass from above
+# setGeneric(
+#   name = 'foo',
+#   signature = 'x',
+#   def = function(x) {
+#     return(standardGeneric(f = 'foo'))
+#   }
+# )
+#
+# setMethod(
+#   f = 'foo',
+#   signature = c('x' = 'loom'),
+#   definition = function(x) {
+#     print("Hello loom!")
+#     print(' -From foo')
+#   }
+# )
diff --git a/R/internal.R b/R/internal.R
deleted file mode 100644 (file)
index 6584e17..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#' @import R6
-#' @importFrom methods setOldClass
-NULL
-
-.onLoad <- function(libname, pkgname) {
-  setOldClass(Classes = 'loom')
-}
-
-.onAttach <- function(libname, pkgname) {
-  .onLoad(libname = libname, pkgname = pkgname)
-}
-
-# # Examples setting S4 methods for R6 classes
-# # Requires the setOldClass from above
-# setGeneric(
-#   name = 'foo',
-#   signature = 'x',
-#   def = function(x) {
-#     return(standardGeneric(f = 'foo'))
-#   }
-# )
-#
-# setMethod(
-#   f = 'foo',
-#   signature = c('x' = 'loom'),
-#   definition = function(x) {
-#     print("Hello loom!")
-#     print(' -From foo')
-#   }
-# )