taxon_at_rank.Rd 1.54 KB
Newer Older
Eric Coissac's avatar
Eric Coissac committed
1
% Generated by roxygen2: do not edit by hand
Eric Coissac's avatar
Eric Coissac committed
2 3 4
% Please edit documentation in R/taxonomy_methods.R, R/taxonomy_robi.R
\name{taxon_at_rank}
\alias{taxon_at_rank}
5
\alias{taxon_at_rank.robitaxid}
Eric Coissac's avatar
Eric Coissac committed
6
\alias{taxon_at_rank.numeric}
Eric Coissac's avatar
Eric Coissac committed
7 8
\title{Extracts the taxid at a specified taxonomic rank.}
\usage{
Eric Coissac's avatar
Eric Coissac committed
9 10
taxon_at_rank(data, taxonomy, rank, with_name = FALSE, results_in, ...)

11 12
\method{taxon_at_rank}{robitaxid}(data, taxonomy, rank, with_name = FALSE, results_in)

Eric Coissac's avatar
Eric Coissac committed
13
\method{taxon_at_rank}{numeric}(data, taxonomy, rank, with_name = FALSE, results_in)
Eric Coissac's avatar
Eric Coissac committed
14 15 16 17 18 19
}
\arguments{
\item{taxonomy}{an object able to provide a taxonomy.}

\item{rank}{a \code{character} indicating the desired rank}

Eric Coissac's avatar
Eric Coissac committed
20 21
\item{taxid}{a vector of taxid to analyse}

Eric Coissac's avatar
Eric Coissac committed
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
\item{name}{A logical value \code{TRUE} or \code{FALSE} indicating
if the method return a taxid or a scientific name.}
}
\value{
\describe{
  \item{If \code{name==FALSE}}{the taxid of the corresponding
                               taxon as an integer or a vector of integers
                               if the \code{taxid} argument is itself
                               a vector}
  \item{If \code{name==TRUE}}{the scientific name of the corresponding
                              taxon as a string or a vector of string
                              if the \code{taxid} argument is itself
                              a vector}
 }
}
\description{
The \code{taxonatrank} method of \code{\linkS4class{obitools.taxonomy}} class
returns the \emph{taxid} or the scientific name corresponding
to a \emph{taxid}.at a specified taxonomic rank
}
\author{
Eric Coissac
}