stax.sel {paleoDiv}R Documentation

Extract subsets of an occurrence data.frame.

Description

Extract subsets of an occurrence data.frame.

Usage

stax.sel(taxa, rank = x$class, x = NULL)

Arguments

taxa

A vector containing subtaxa (or any other entries matching entries of rank) to be returned

rank

Vector or column of x in which to look for entries matching taxa. defaults to x$class, for selecting class-level subtaxa from large datasets (only works if pdb(...,full=TRUE))

x

Optional occurrence data.frame. If set, a data.frame with the selected entries will be returned.

Value

If is.null(x) (default), a vector giving the indices of values matching taxa in rank. Otherwise, an occurrence data.frame() containing only the selected taxa or values.

Examples

data(archosauria)
archosauria$Stegosauria->stegos
stax.sel(c("Stegosaurus"), rank=stegos$genus,x=stegos)->Stegosaurus

[Package paleoDiv version 0.3.0 Index]