Learn R Programming

untb (version 1.7-7-1)

extractor: Extract rows of a database in count form

Description

Extracts rows of a data frame and, if there is one row only, coerces to a count object, preserving the species names

Usage

extractor(x, index)

Arguments

x

A data frame with column headings being species names

index

A vector of indices to extract

Author

Robin K. S. Hankin

Details

If index is length one, the numbers are interpreted as species counts, and the output is coerced to a count object.

Examples

Run this code
data(saunders)
plot(extant(extractor(saunders,1)))

Run the code above in your browser using DataLab