R: Get BOLD specimen + sequence data.

bold_filter {bold} | R Documentation

## Get BOLD specimen + sequence data.

### Description

Get BOLD specimen + sequence data.

### Usage

    bold_filter(x, by, how = "max")

### Arguments

`x` | (data.frame) a data.frame, as returned from `bold_seqspec`. Note that some combinations of parameters in `bold_seqspec` don't return a data.frame. Stops with error message if this is not a data.frame. Required.
`by` | (character) the column by which to group. For example, if you want the longest sequence for each unique species name, then pass species_name. If the column doesn't exist, error with message saying so. Required.
`how` | (character) one of "max" or "min", which get used as `which.max` or `which.min` to get the longest or shortest sequence, respectively. Note that we remove gap/alignment characters (`-`)

### Value

a tibble/data.frame

### Examples

    ## Not run:
    res <- bold_seqspec(taxon='Osmia')
    maxx <- bold_filter(res, by = "species_name")
    minn <- bold_filter(res, by = "species_name", how = "min")

    vapply(maxx$nucleotides, nchar, 1, USE.NAMES = FALSE)
    vapply(minn$nucleotides, nchar, 1, USE.NAMES = FALSE)

    ## End(Not run)

[Package bold version 0.5.0 Index]