Package taxlist version 0.2.4
Description
根据命名法的解析程度和特定角色,包含分类单元用法名称(学名)的字符串由不同部分组成。
因此,带有名称的字符串可以分解成这些部分,同时部分的数量可能表明了分类等级。
该方法是 strsplit() 的包装器,如果在参数【repaste】中指明的话,还可以重新粘贴名称组分。
Usage
R
dissect_name(x, split = " ", fixed = TRUE, repaste, ...)
Arguments
参数【x】:一个包含分类名称的字符向量。
参数【split,fixed,...】:传递给 strsplit() 的参数。
参数【repaste】:一个整数向量,指示输出的名称的组分。
Value
一个字符矩阵,在输入向量中具有与名称相同数量的行。如果指定了reaste,那么输出将是一个字符向量。
Examples
++预备:十个变种名称:++
R
sp_list <- subset(x = Easplist, subset = Level == "variety", slot = "relations")
sp_list <- accepted_name(sp_list)[c(1:10), "TaxonName"]
++直接解析名称:++
R
dissect_name(sp_list)
[,1] [,2] [,3] [,4]
[1,] "Euphorbia" "inaequilatera" "var." "dentata"
[2,] "Oldenlandia" "corymbosa" "var." "caespitosa"
[3,] "Pilea" "usambarensis" "var." "veronicifolia"
[4,] "Trifolium" "semipilosum" "var." "glabrescens"
[5,] "Pentas" "lanceolata" "var." "nemorosa"
[6,] "Stachys" "aculeolata" "var." "aculeolata"
[7,] "Pimpinella" "oreophila" "var." "kilimandscharica"
[8,] "Cyperus" "denudatus" "var." "lucenti-nigricans"
[9,] "Achyranthes" "aspera" "var." "sicula"
[10,] "Digitaria" "diagonalis" "var." "uniglumis"
++解析名称,输出前两个组分:++
R
dissect_name(sp_list, repaste = c(1:2))
[1] "Euphorbia inaequilatera" "Oldenlandia corymbosa" "Pilea usambarensis"
[4] "Trifolium semipilosum" "Pentas lanceolata" "Stachys aculeolata"
[7] "Pimpinella oreophila" "Cyperus denudatus" "Achyranthes aspera"
[10] "Digitaria diagonalis"