ortho.Rd 2.37 KB
 Eric Coissac committed Jul 09, 2018 1 2 3 4 % Generated by roxygen2: do not edit by hand % Please edit documentation in R/multivariate.R \name{ortho} \alias{ortho}  Eric Coissac committed Sep 12, 2019 5 6 7 \alias{ortho.dist} \alias{ortho.matrix} \alias{ortho.data.frame}  Eric Coissac committed Oct 01, 2019 8 \alias{ortho.procmod_frame}  Eric Coissac committed Jul 09, 2018 9 10 11 \title{Project a dataset in a euclidean space.} \usage{ ortho(data, ...)  Eric Coissac committed Sep 12, 2019 12   Eric Coissac committed Oct 01, 2019 13 \method{ortho}{dist}(data, tol = 1e-07, ...)  Eric Coissac committed Sep 12, 2019 14   Eric Coissac committed Oct 01, 2019 15 \method{ortho}{matrix}(data, scale = FALSE, ...)  Eric Coissac committed Sep 12, 2019 16   Eric Coissac committed Oct 01, 2019 17 \method{ortho}{data.frame}(data, scale = FALSE, ...)  Eric Coissac committed Sep 12, 2019 18   Eric Coissac committed Oct 01, 2019 19 \method{ortho}{procmod_frame}(data, ...)  Eric Coissac committed Sep 12, 2019 20 21 22 23 } \arguments{ \item{data}{a numeric matrix describing the points}  Eric Coissac committed Oct 01, 2019 24 25 \item{...}{other parameters specific to some implementation}  Eric Coissac committed Sep 12, 2019 26 27 28 29 30 31 32 33 34 35 36 \item{tol}{a tolerance threshold : an eigenvalue is considered positive if it is larger than -tol*lambda1 where lambda1 is the largest eigenvalue.} \item{scale}{a \code{logical} value indicating if the dimensions must be scaled to force for every column that \code{sd=1}. \code{FALSE} by default.} } \value{ a numeric matrix with at most \code{n-1} dimensions, with \code{n} the number pf observations. This matrix defines the coordinates of each point in the orthogonal space.  Eric Coissac committed Jul 09, 2018 37 38 39 40 41 42 43 44 45 } \description{ Project a set of points defined by a distance matrix or a set of variables in an eucleadean space. If the distance matrix is a metric, this is done using the \code{\link[ProcMod]{pcoa}} function, for other distance the \code{\link[ProcMod]{nmds}} is used. When points are described by a set of variable the \code{\link[ProcMod]{nmds}} is used.  Eric Coissac committed Oct 23, 2019 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 } \examples{ library(vegan) data(bacteria) data(eukaryotes) data(soil) dataset <- procmod_frame(euk = vegdist(decostand(eukaryotes, method = "hellinger"), method = "euclidean"), bac = vegdist(decostand(bacteria, method = "hellinger"), method = "euclidean"), soil = scale(soil, center = TRUE, scale = TRUE)) dp <- ortho(dataset) bacteria_rel_freq <- sweep(bacteria, 1, rowSums(bacteria), "/") bacteria_hellinger <- sqrt(bacteria_rel_freq) bacteria_dist <- dist(bacteria_hellinger) project <- ortho(bacteria_dist)  Eric Coissac committed Jul 09, 2018 74 75 76 77 78 79 } \author{ Eric Coissac Christelle Gonindard-Melodelima }