[Archetypes-commits] r13 - in pkg: . R inst inst/doc
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Mar 31 19:24:29 CEST 2009
Author: manuel
Date: 2009-03-31 19:24:29 +0200 (Tue, 31 Mar 2009)
New Revision: 13
Modified:
pkg/DESCRIPTION
pkg/R/archetypes-class.R
pkg/R/archetypes-kit.R
pkg/R/archetypes-movie.R
pkg/inst/CITATION
pkg/inst/doc/archetypes.bib
Log:
Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION 2009-01-06 15:46:06 UTC (rev 12)
+++ pkg/DESCRIPTION 2009-03-31 17:24:29 UTC (rev 13)
@@ -1,10 +1,10 @@
Package: archetypes
Type: Package
Title: Archetypal Analysis
-Version: 0.1
-Date: 2008-11-26
+Version: 0.1-1
+Date: 2009-03-13
Depends: nnls (>= 1.1)
-Suggests: MASS
+Suggests: MASS, vcd
Author: Manuel J. A. Eugster <manuel.eugster at stat.uni-muenchen.de>
Maintainer: Manuel J. A. Eugster <manuel.eugster at stat.uni-muenchen.de>
Description: The main function archetypes implements a framework for
@@ -14,4 +14,5 @@
Roxygen documentation system. At the moment, Roxygen does not produce
"good" help pages for the everyday use of a package; we refer to the
vignette for a consistent package illustration.
-License: GPL version 2 or newer
+License: GPL (>= 2)
+Revision: 13
Modified: pkg/R/archetypes-class.R
===================================================================
--- pkg/R/archetypes-class.R 2009-01-06 15:46:06 UTC (rev 12)
+++ pkg/R/archetypes-class.R 2009-03-31 17:24:29 UTC (rev 13)
@@ -1,10 +1,10 @@
#' Archetypes object constructor.
-#' @param archetypes The archetypes; a $p \times m$ matrix, see
+#' @param archetypes The archetypes; a \eqn{p \times m} matrix, see
#' \code{\link{atypes}}.
#' @param k The number of archetypes;
-#' @param alphas The coefficients; a $n \times p$ matrix, see
+#' @param alphas The coefficients; a \eqn{n \times p} matrix, see
#' \code{\link{alphas}}.
#' @param rss The residual sum of squares; see \link{rss}.
#' @param iters The number of iterations to the convergence.
@@ -12,7 +12,7 @@
#' @param history If \code{saveHistory} set then an environment with the
#' archetypes object for each execution step;
#' @param kappas The kappas for each system of linear equations.
-#' @param betas The data coefficients; a $p \times n$ matrix.
+#' @param betas The data coefficients; a \eqn{p \times n} matrix.
#' @param zas The temporary archetypes.
#' @return A list with an element for each parameter and class attribute
#' \code{archetypes}.
@@ -157,6 +157,27 @@
+#' Beta getter.
+#' @param zs An \code{archetypes}-related object.
+#' @param ... Further arguments.
+#' @return Beta matrix.
+#' @export
+betas <- function(zs, ...) {
+ UseMethod('betas')
+}
+
+#' Beta getter.
+#' @param zs An \code{archetypes} object.
+#' @param ... Ignored.
+#' @return Beta matrix.
+#' @method betas archetypes
+#' @S3method betas archetypes
+betas.archetypes <- function(zs, ...) {
+ return(zs$betas)
+}
+
+
+
#' Iteration getter.
#' @param zs An \code{archetypes}-related object.
#' @param ... Further arguments.
Modified: pkg/R/archetypes-kit.R
===================================================================
--- pkg/R/archetypes-kit.R 2009-01-06 15:46:06 UTC (rev 12)
+++ pkg/R/archetypes-kit.R 2009-03-31 17:24:29 UTC (rev 13)
@@ -5,7 +5,7 @@
#' Perform archetypal analysis on a data matrix.
-#' @param data A numeric $n \times m$ data matrix.
+#' @param data A numeric \eqn{n \times m} data matrix.
#' @param k The number of archetypes.
#' @param maxIterations The maximum number of iterations.
#' @param minImprovement The minimal value of improvement between two
Modified: pkg/R/archetypes-movie.R
===================================================================
--- pkg/R/archetypes-movie.R 2009-01-06 15:46:06 UTC (rev 12)
+++ pkg/R/archetypes-movie.R 2009-03-31 17:24:29 UTC (rev 13)
@@ -6,13 +6,15 @@
#' @param show Show archetypes or approximated data.
#' @param ssleep Seconds to sleep before start.
#' @param bsleep Seconds to sleep between each plot.
+#' @param postfn Post plot function; is called in each
+#' iteration after the plot call.
#' @param ... Passed to underlying plot functions.
#' @return Undefined.
#' @export
movieplot <- function(zs, data, show=c('atypes', 'adata'),
- ssleep=0, bsleep=0, ...) {
+ ssleep=0, bsleep=0, postfn=function(iter){}, ...) {
- steps <- length(zs$history)
+ steps <- length(zs$history)
atypesmovie <- ifelse(show[1] == 'atypes', TRUE, FALSE)
Sys.sleep(ssleep)
@@ -24,6 +26,8 @@
plot(a, data, ...)
else
plot(adata(a), ...)
+
+ postfn(i)
Sys.sleep(bsleep)
}
Modified: pkg/inst/CITATION
===================================================================
--- pkg/inst/CITATION 2009-01-06 15:46:06 UTC (rev 12)
+++ pkg/inst/CITATION 2009-03-31 17:24:29 UTC (rev 13)
@@ -9,4 +9,4 @@
url="http://epub.ub.uni-muenchen.de/8270/",
textVersion=paste("Manuel J. A. Eugster and Friedrich Leisch. Spider-Man,",
"the Child and the Trickster -- Archetypal Analysis in R.",
- "Technical Report 44, LMU München, 2008."))
+ "Technical Report 44, LMU Muenchen, 2008."))
Modified: pkg/inst/doc/archetypes.bib
===================================================================
--- pkg/inst/doc/archetypes.bib 2009-01-06 15:46:06 UTC (rev 12)
+++ pkg/inst/doc/archetypes.bib 2009-03-31 17:24:29 UTC (rev 13)
@@ -113,7 +113,7 @@
}
@ARTICLE{Heinz+Peterson+Johnson+Kerk at 2003,
- title = {Exploring Relationships in Body Dimensins},
+ title = {Exploring Relationships in Body Dimensions},
author = {Grete Heinz and Louis J. Peterson and Roger W. Johnson and
Carter J. Kerk},
journal = {Journal of Statistics Education},
More information about the Archetypes-commits
mailing list