as_data_frame {taxa} | R Documentation |
Convert a taxa object to a data.frame
Description
Convert the information in a taxa object to a data.frame
using base R
vectors as columns. Use as_tibble to convert to tibbles.
Usage
as_data_frame(
x,
row.names = NULL,
optional = FALSE,
...,
stringsAsFactors = FALSE
)
Arguments
x |
|
row.names |
|
optional |
logical. If |
... |
additional arguments to be passed to or from methods. |
stringsAsFactors |
logical: should the character vector be converted to a factor? |
Examples
x <- taxon(name = c('Homo sapiens', 'Bacillus', 'Ascomycota', 'Ericaceae'),
rank = c('species', 'genus', 'phylum', 'family'),
id = taxon_id(c('9606', '1386', '4890', '4345'), db = 'ncbi'),
auth = c('Linnaeus, 1758', 'Cohn 1872', NA, 'Juss., 1789'))
as_data_frame(x)
[Package taxa version 0.4.3 Index]