diff --git a/NAMESPACE b/NAMESPACE index 090c80036c44380c78955142e2bf9a605aa1273a..a172ce7d06060a1dba18c8a12e110a37baf6103b 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -22,7 +22,7 @@ S3method(print,pm) S3method(residuals,pm) S3method(subset,procmod.frame) export(as.procmod.frame) -export(bicentered) +export(bicenter) export(dist2orthospace) export(is.euclid) export(is.pm) diff --git a/R/multivariate.R b/R/multivariate.R index 52d96d43adaea3e1046343385329d2b519e8f157..39fa4c48a0e19e3ab4a8b48b0b59d45b5346f7b0 100644 --- a/R/multivariate.R +++ b/R/multivariate.R @@ -20,7 +20,11 @@ nmds = function(distances, k = attr(distances,"Size") - 1 + y = suppressWarnings(cmdscale(distances,k)) + k = ncol(y) + n = isoMDS(distances, + y=y, k=k, maxit = maxit, trace = trace, @@ -46,10 +50,10 @@ pcoa = function(distances) { stopifnot(inherits(distances,"dist")) k = attr(distances,"Size") - 1 - x = cmdscale(distances,k=k) + x = suppressWarnings(cmdscale(distances,k=k)) attr(x,"method")="pcoa" - return() + return(x) } #' Project a set of points in a euclidean space (PCA). @@ -79,7 +83,7 @@ pca = function(data,scale=FALSE) { #' \url{https://stackoverflow.com/questions/43639063/double-centering-in-r} #' #' @export -bicentered = function(m) { +bicenter = function(m) { # compute the row-wise and column-wise mean matrices R = m*0 + rowMeans(m)