File: nodepath.Rd

package info (click to toggle)
r-cran-ape 5.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,932 kB
  • sloc: ansic: 7,626; cpp: 116; sh: 17; makefile: 2
file content (31 lines) | stat: -rw-r--r-- 791 bytes parent folder | download | duplicates (7)
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
\name{nodepath}
\alias{nodepath}
\title{Find Paths of Nodes}
\description{
  This function finds paths of nodes in a tree. The nodes can be
  internal and/or terminal (i.e., tips).
}
\usage{
nodepath(phy, from = NULL, to = NULL)
}
\arguments{
  \item{phy}{an object of class \code{"phylo"}.}
  \item{from, to}{integers giving node or tip numbers.}
}
\details{
  By default, this function returns all the paths from the root to each
  tip of the tree. If both arguments \code{from} and \code{to} are
  specified, the shortest path of nodes linking them is returned.
}
\value{
  a list of vectors of integers (by default), or a single vector of
  integers.
}
\author{Emmanuel Paradis}
\seealso{\code{\link{getMRCA}}}
\examples{
tr <- rtree(2)
nodepath(tr)
nodepath(tr, 1, 2)
}
\keyword{manip}