https://github.com/cran/CluMix
Revision b6ad4d474d5865090b0bfabf2570aa79580237a4 authored by Manuela Hummel on 16 May 2017, 09:19:23 UTC, committed by cran-robot on 16 May 2017, 09:19:23 UTC
1 parent dd414a4
Raw File
Tip revision: b6ad4d474d5865090b0bfabf2570aa79580237a4 authored by Manuela Hummel on 16 May 2017, 09:19:23 UTC
version 2.0
Tip revision: b6ad4d4
dist.subjects.Rd
\name{dist.subjects}
\alias{dist.subjects}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Distance matrix for subjects}
\description{Get distance matrix for subjects (observations) based on variables of mixed data types}

\usage{
dist.subjects(data, weights, alwaysGower = FALSE)
}

\arguments{
  \item{data}{data frame}
  \item{weights}{optional vector of weights for variables in \code{data}}
  \item{alwaysGower}{controls the way distances are calculated in case of exclusively continuous data; if \code{FALSE} (default), Euclidean distances, if \code{TRUE} Gower's distances}
}

\details{Distances between subjects are based on Gower's general similarity coefficient with an extension of Podani for ordinal variables, see \code{\link[FD]{gowdis}}. In the case that all variables are quantitative, either Euclidean distances or still Gower's distances can be used.}

\value{An object of class \code{\link[stats]{dist}}}

\references{
Gower J (1971). A general coefficient of similarity and some of its properties. Biometrics, 27:857-871.

Podani J (1999). Extending Gower's general coefficient of similarity to ordinal characters. Taxon, 48(2):331-340.
}

\author{Manuela Hummel}

%\note{
%%  ~~further notes~~
%}

\seealso{\code{\link{dendro.subjects}}, \code{\link{similarity.subjects}}, \code{\link{dist.variables}}, \code{\link{mix.heatmap}}}

\examples{
data(mixdata)

D <- dist.subjects(mixdata)

## example with weights
w <- rep(1:2, each=5)
D <- dist.subjects(mixdata, weights=w)
}

\keyword{ math }
\keyword{ cluster }
back to top