[Archetypes-commits] r50 - in pkg: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Oct 26 10:23:36 CEST 2011


Author: manuel
Date: 2011-10-26 10:23:25 +0200 (Wed, 26 Oct 2011)
New Revision: 50

Added:
   pkg/R/generics.R
Modified:
   pkg/DESCRIPTION
   pkg/R/archetypes-class.R
   pkg/R/archetypes-kit-blocks.R
   pkg/R/archetypes-kit.R
   pkg/R/archetypes-panorama.R
   pkg/R/archetypes-pcplot.R
   pkg/R/archetypes-robust.R
   pkg/R/archetypes-step.R
   pkg/R/archetypes-weighted.R
   pkg/R/memento.R
   pkg/R/pcplot.R
   pkg/R/skeletonplot.R
Log:
...

Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2011-10-25 15:27:51 UTC (rev 49)
+++ pkg/DESCRIPTION	2011-10-26 08:23:25 UTC (rev 50)
@@ -1,7 +1,7 @@
 Package: archetypes
 Type: Package
 Title: Archetypal Analysis
-Version: 2.1
+Version: 2.1-0
 Date: 2011-10-25
 Depends:
     methods,
@@ -25,6 +25,7 @@
 Revision: 44
 Collate:
     'archetypes-barplot.R'
+    'generics.R'
     'archetypes-class.R'
     'archetypes-kit-blocks.R'
     'archetypes-kit.R'
@@ -39,4 +40,3 @@
     'archetypes-xyplot.R'
     'memento.R'
     'skeletonplot.R'
-    'generics.R'

Modified: pkg/R/archetypes-class.R
===================================================================
--- pkg/R/archetypes-class.R	2011-10-25 15:27:51 UTC (rev 49)
+++ pkg/R/archetypes-class.R	2011-10-26 08:23:25 UTC (rev 50)
@@ -1,6 +1,9 @@
+#' @include generics.R
+{}
 
 
-#' Archetypes object constructor and methods
+
+#' Archetypes object constructor
 #'
 #' @param object The archetypes; a \eqn{p \times m} matrix, see
 #'   \code{\link{parameters}}.
@@ -52,10 +55,9 @@
 
 
 
-setOldClass('archetypes')
+setOldClass(c("archetypes"))
 
 
-
 #' @S3method print archetypes
 print.archetypes <- function(x, full = TRUE, ...) {
   if ( full ) {
@@ -93,6 +95,9 @@
 #' @param ... Ignored.
 #' @return Matrix with \eqn{k} archetypes.
 #'
+#' @aliases parameters-methods
+#' @aliases parameters,archetypes-method
+#'
 #' @importFrom modeltools parameters
 #' @exportMethod parameters
 setMethod('parameters', signature = c(object = 'archetypes'),

Modified: pkg/R/archetypes-kit-blocks.R
===================================================================
--- pkg/R/archetypes-kit-blocks.R	2011-10-25 15:27:51 UTC (rev 49)
+++ pkg/R/archetypes-kit-blocks.R	2011-10-26 08:23:25 UTC (rev 50)
@@ -389,7 +389,7 @@
 ### Archetypes family: ###############################################
 
 
-#' Archetypes family constructor.
+#' Archetypes family constructor
 #'
 #' This function returns a problem solving block for each of the
 #' different conceptual parts of the algorithm.
@@ -397,8 +397,11 @@
 #' @param which The kind of archetypes family.
 #' @param ... Exchange predefined family blocks with self-defined
 #'            functions.
+#'
 #' @return A list containing a function for each of the different parts.
-#' @seealso \code{\link{archetypes}}
+#'
+#' @family archetypes
+#'
 #' @export
 archetypesFamily <- function(which = c('original', 'weighted', 'robust'), ...) {
 

Modified: pkg/R/archetypes-kit.R
===================================================================
--- pkg/R/archetypes-kit.R	2011-10-25 15:27:51 UTC (rev 49)
+++ pkg/R/archetypes-kit.R	2011-10-26 08:23:25 UTC (rev 50)
@@ -1,3 +1,4 @@
+#' @include generics.R
 #' @include archetypes-kit-blocks.R
 #' @include archetypes-class.R
 {}

Modified: pkg/R/archetypes-panorama.R
===================================================================
--- pkg/R/archetypes-panorama.R	2011-10-25 15:27:51 UTC (rev 49)
+++ pkg/R/archetypes-panorama.R	2011-10-26 08:23:25 UTC (rev 50)
@@ -1,16 +1,6 @@
 
 
-#' Panorama plot.
-#' @param object An object.
-#' @param ... Further arguments.
-#' @return Undefined.
-#' @export
-panorama <- function(object, ...) {
-  UseMethod('panorama')
-}
 
-
-
 #' Panorma plot for archetypes.
 #' @param object An \code{\link{archetypes}}-related object.
 #' @param data A matrix or data frame.

Modified: pkg/R/archetypes-pcplot.R
===================================================================
--- pkg/R/archetypes-pcplot.R	2011-10-25 15:27:51 UTC (rev 49)
+++ pkg/R/archetypes-pcplot.R	2011-10-26 08:23:25 UTC (rev 50)
@@ -29,7 +29,7 @@
     lines.pcplot(data[chull,], data,
                  col=chull.col, lwd=chull.lwd, lty=chull.lty, ...)
 
-  lines.pcplot(atypes(x), data,
+  lines.pcplot(parameters(x), data,
                col=atypes.col, lwd=atypes.lwd, lty=atypes.lty, ...)
 }
 

Modified: pkg/R/archetypes-robust.R
===================================================================
--- pkg/R/archetypes-robust.R	2011-10-25 15:27:51 UTC (rev 49)
+++ pkg/R/archetypes-robust.R	2011-10-26 08:23:25 UTC (rev 50)
@@ -5,10 +5,11 @@
 
 
 
-#' Robust archetypes.
+#' Robust archetypes
 #'
 #' @inheritParams archetypes
-#' @param familyBlocks Exchange predefined family blocks.
+#' @param familyBlocks Exchange predefined family blocks; see
+#'   \code{\link{archetypesFamily}}.
 #'
 #' @return An object of class \code{robustArchetypes} and
 #'   \code{\link{as.archetypes}}.
@@ -35,5 +36,4 @@
 
 
 
-#setOldClass("robustArchetypes")
-#setIs("robustArchetypes", "archetypes")
+setOldClass(c("robustArchetypes", "archetypes"))

Modified: pkg/R/archetypes-step.R
===================================================================
--- pkg/R/archetypes-step.R	2011-10-25 15:27:51 UTC (rev 49)
+++ pkg/R/archetypes-step.R	2011-10-26 08:23:25 UTC (rev 50)
@@ -116,6 +116,9 @@
 
 
 
+#' @aliases parameters,stepArchetypes-method
+#' @rdname parameters
+#' @importFrom modeltools parameters
 #' @exportMethod parameters
 setMethod('parameters', signature = c(object = 'stepArchetypes'),
 function(object, ...) {
@@ -176,6 +179,8 @@
 
 
 
+#' @aliases parameters,repArchetypes-method
+#' @rdname parameters
 #' @importFrom modeltools parameters
 #' @exportMethod parameters
 setMethod('parameters', signature = signature(object = 'repArchetypes'),

Modified: pkg/R/archetypes-weighted.R
===================================================================
--- pkg/R/archetypes-weighted.R	2011-10-25 15:27:51 UTC (rev 49)
+++ pkg/R/archetypes-weighted.R	2011-10-26 08:23:25 UTC (rev 50)
@@ -9,7 +9,8 @@
 #'
 #' @inheritParams archetypes
 #' @param weights Data weights matrix.
-#' @param familyBlocks Exchange predefined family blocks.
+#' @param familyBlocks Exchange predefined family blocks; see
+#'   \code{\link{archetypesFamily}}.
 #'
 #' @return An object of class \code{weightedArchetypes} and
 #'   \code{\link{as.archetypes}}.
@@ -36,6 +37,4 @@
 
 
 
-#setOldClass("weightedArchetypes")
-#setIs("weightedArchetypes", "archetypes")
-
+setOldClass(c("weightedArchetypes", "archetypes"))

Added: pkg/R/generics.R
===================================================================
--- pkg/R/generics.R	                        (rev 0)
+++ pkg/R/generics.R	2011-10-26 08:23:25 UTC (rev 50)
@@ -0,0 +1,59 @@
+
+#' Defined generics
+#'
+#' Generics defined by the archetypes package.
+#'
+#' @param object An object
+#' @param ... Futher arguments
+#' @rdname archetypes-generics
+#'
+#' @export
+rss <- function(object, ...) {
+  UseMethod('rss')
+}
+
+
+
+#' Return number of parameters
+#'
+#' @rdname archetypes-generics
+#'
+#' @export
+nparameters <- function(object, ...) {
+  UseMethod('nparameters')
+}
+
+
+
+
+#' Return best model
+#'
+#' @rdname archetypes-generics
+#'
+#' @export
+bestModel <- function(object, ...) {
+  UseMethod('bestModel')
+}
+
+
+
+#' Panorama
+#'
+#' @rdname archetypes-generics
+#'
+#' @export
+panorama <- function(object, ...) {
+  UseMethod('panorama')
+}
+
+
+
+#' Parallel coordinates plot
+#'
+#' @param x An object.
+#' @rdname archetypes-generics
+#'
+#' @export
+pcplot <- function(x, ...) {
+  UseMethod('pcplot')
+}


Property changes on: pkg/R/generics.R
___________________________________________________________________
Added: svn:keywords
   + Date Revision Author URL Id Header
Added: svn:eol-style
   + native

Modified: pkg/R/memento.R
===================================================================
--- pkg/R/memento.R	2011-10-25 15:27:51 UTC (rev 49)
+++ pkg/R/memento.R	2011-10-26 08:23:25 UTC (rev 50)
@@ -6,8 +6,9 @@
 #'
 #' @param i The number of the state.
 #' @param state The state to save.
+#'
 #' @return Memento environment.
-#' @export
+#'
 #' @examples
 #'   \dontrun{
 #'   m <- new.memento()
@@ -16,6 +17,9 @@
 #'   m$get(i)
 #'   }
 #' @aliases memento
+#' @rdname memento
+#'
+#' @export
 new.memento <- function() {
 
   memento <- new.env(parent = emptyenv())

Modified: pkg/R/pcplot.R
===================================================================
--- pkg/R/pcplot.R	2011-10-25 15:27:51 UTC (rev 49)
+++ pkg/R/pcplot.R	2011-10-26 08:23:25 UTC (rev 50)
@@ -1,14 +1,8 @@
+#' @include generics.R
+{}
 
 
-#' Parallel coordinates plot.
-#' @param x An object.
-#' @param ... Further arguments.
-#' @export
-pcplot <- function(x, ...) {
-  UseMethod('pcplot')
-}
 
-
 #' Default parallel coordinates plot.
 #'
 #' Code copied from function \code{\link[MASS]{parcoord}} of package

Modified: pkg/R/skeletonplot.R
===================================================================
--- pkg/R/skeletonplot.R	2011-10-25 15:27:51 UTC (rev 49)
+++ pkg/R/skeletonplot.R	2011-10-26 08:23:25 UTC (rev 50)
@@ -137,9 +137,9 @@
 #' measurements available in data set \code{\link{skel}}.
 #'
 #' @return Generic skeleton instance.
+#' @rdname skeletonplot
+#'
 #' @export
-#' @usage
-#'   jd()
 jd <- function() {
   jd <- rbind(c(AnkleDiam=13.9, KneeDiam=18.8, WristDiam=10.5, Bitro=32.0,
                 Biil=27.8, ElbowDiam=13.4, ChestDiam=28.0, ChestDp=15,



More information about the Archetypes-commits mailing list