Commit 0a9031a8 by Eric Coissac

Add internal doc

parent 221518a4
......@@ -6,6 +6,25 @@
#'
NULL
#' Transform raw data to be projected in an orthogonal space.
#'
#' The function follow two recepies according to the class of \code{x}.
#' If x is a distance objet or a \code{data.frame} with an attribute \code{is.dist}
#' set to \code{TRUE}, the matrice is projected using the \code{\link{ortho.dist}} method.
#' Otherwise, the data are just projected using a PCA.
#'
#' @param x the table to transform
#'
#' @return a numeric matrix
#'
#' @seealso \code{\link{ortho.dist}}
#' @seealso \code{\link{pca}}
#'
#' @note Internal function, do not use.
#'
#' @author Eric Coisaac <eric.coissac@metabarcoding.org>
#' @rdname internal.transformData
#'
.transformData = function(x) {
if (is.data.frame(x) && !is.null(attr(x,'is.dist')) && attr(x,'is.dist')==TRUE)
return(ortho.dist(as.dist(as.matrix(x))))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment