九江網(wǎng)站開發(fā)汕頭百度推廣公司
Package?taxa?version 0.4.2
Description
? ? ? ? 將其他對象轉(zhuǎn)換為 taxon 向量。taxon 構(gòu)造器可能將 基礎(chǔ)向量轉(zhuǎn)換為 taxon 向量。
Usage
as_taxon(x, ...)
Arguments
參數(shù)【x】:要轉(zhuǎn)換為 taxon 向量的對象。
參數(shù)【...】:其余參數(shù)。
Examples
x <- taxonomy(taxon(name = c('Carnivora', 'Felidae', 'Panthera', 'Panthera leo','Panthera tigris', 'Ursidae', 'Ursus', 'Ursus arctos'),rank = c('order', 'family', 'genus', 'species','species', 'family', 'genus', 'species'),id = taxon_id(c('33554', '9681', '9688', '9689','9694', '9632', '9639', '9644'),db = 'ncbi'),auth = c('Bowdich, 1821', 'Fischer de Waldheim, 1817', 'Oken, 1816', 'L., 1758','L., 1758', 'Fischer de Waldheim, 1817', 'L., 1758', 'L., 1758')),supertaxa = c(NA, 1, 2, 3, 3, 1, 6, 7))
names(x) <- letters[1:8]
as_taxon(x)
<taxon[8]>a 33554|Carnivora Bowdich 1821|order b
9681|Felidae Fischer de Waldheim 1817|family c 9688|Panthera Oken 1816|genus d 9689|Panthera leo L. 1758|species e 9694|Panthera tigris L. 1758|species f
9632|Ursidae Fischer de Waldheim 1817|family g 9639|Ursus L. 1758|genus h 9644|Ursus arctos L. 1758|species
Rank levels: order < family < genus < species
> as_taxon(c('Carnivora', 'Felidae', 'Panthera', 'Panthera leo'))
<taxon[4]>
[1] Carnivora Felidae Panthera Panthera leo
> as_taxon(factor(c('Carnivora', 'Felidae', 'Panthera', 'Panthera leo')))
<taxon[4]>
[1] Carnivora Felidae Panthera Panthera leo