make_taxon_fromclass: Make taxon from class

Description Usage Arguments Examples

View source: R/make_taxon_fromclass.R

Description

Make taxon from class

Usage

1
make_taxon_fromclass(data, authority = "none")

Arguments

data

A data.frame

authority

Taxonomic authority

Examples

1
2
3
4
5
df <- data.frame(rank=c('family','tribe','subtribe','genus','subgenus','species'),
                 name=c('Helianthi','Helianthi','Helianthi','Poa','Festuci','Poa annua'),
                 id=c(1,2,3,4,5,6),
                 stringsAsFactors = FALSE)
apply(df, 1, make_taxon_fromclass)

Example output

Attaching package: 'binomen'

The following object is masked from 'package:stats':

    binomial

The following objects are masked from 'package:base':

    grouping, rank

[[1]]
[[1]]$family
<taxonref>
  rank: family
  name: Helianthi
  id: 1
  uri: none


[[2]]
[[2]]$tribe
<taxonref>
  rank: tribe
  name: Helianthi
  id: 2
  uri: none


[[3]]
[[3]]$subtribe
<taxonref>
  rank: subtribe
  name: Helianthi
  id: 3
  uri: none


[[4]]
[[4]]$genus
<taxonref>
  rank: genus
  name: Poa
  id: 4
  uri: none


[[5]]
[[5]]$subgenus
<taxonref>
  rank: subgenus
  name: Festuci
  id: 5
  uri: none


[[6]]
[[6]]$species
<taxonref>
  rank: species
  name: Poa annua
  id: 6
  uri: none

binomen documentation built on May 30, 2017, 7:38 a.m.