File: findGroves.Rd

package info (click to toggle)
r-cran-treespace 1.1.4.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,444 kB
  • sloc: cpp: 24; sh: 13; makefile: 2
file content (65 lines) | stat: -rw-r--r-- 1,920 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/findGroves.R
\name{findGroves}
\alias{findGroves}
\title{Identify clusters of similar trees}
\usage{
findGroves(
  x,
  method = "treeVec",
  nf = NULL,
  clustering = "ward.D2",
  nclust = NULL,
  ...
)
}
\arguments{
\item{x}{an object of the class multiPhylo or the output of the function \code{treespace}}

\item{method}{(ignored if x is from \code{treespace}) this specifies a function which outputs the summary of a tree in the form of a vector. Defaults to \code{treeVec}.}

\item{nf}{(ignored if x is from \code{treespace}) the number of principal components to retain}

\item{clustering}{a character string indicating the clustering method to be used; defaults to Ward's method; see argument \code{method} in \code{?hclust} for more details.}

\item{nclust}{an integer indicating the number of clusters to find; if not provided, an interactive process based on cutoff threshold selection is used.}

\item{...}{further arguments to be passed to \code{treespace}}
}
\value{
A list containing:
\itemize{
 \item groups: a factor defining groups of trees
 \item treespace: the output of treespace
}
}
\description{
This function uses hierarchical clustering on principal components output by \code{\link{treespace}} to identify groups of similar trees. Clustering relies on \code{\link{hclust}}, using Ward's method by default.
}
\examples{

if(require("adegenet") && require("adegraphics")){
## load data
data(woodmiceTrees)

## run findGroves: treespace+clustering
res <- findGroves(woodmiceTrees, nf=5, nclust=6)

## plot results on first 2 axes
PCs <- res$treespace$pco$li
s.class(PCs, fac=res$groups, col=funky(6))

## using plotGroves
plotGroves(res)
}


}
\seealso{
\code{\link{plotGroves}} to display results
}
\author{
Thibaut Jombart \email{thibautjombart@gmail.com}

Michelle Kendall \email{michelle.louise.kendall@gmail.com}
}