View source: R/BotanicalCorrection.R
BotanicalCorrection | R Documentation |
Botanical Correction
BotanicalCorrection(Data, Source = NULL, WFOData = NULL, DetectOnly = FALSE)
Data |
Dataset (data.frame or data.table) The dataset must contain the columns:
|
Source |
(character) To correct and standardise, you can choose between:
|
WFOData |
To be filled in if the argument |
DetectOnly |
TRUE: Only detect errors, FALSE: detect and correct errors (Default: FALSE) (logical) |
No special characters (typography)
No family name in the Genus and Species columns (the suffix "aceae" is specific to the family name.
Correct spelling of botanical names (Taxonstand or WorldFlora)
Family & Scientific names match (BIOMASS::getTaxonomy or WorldFlora)
Update the scientific botanical names with the current phylogenetic classification
Check invariant botanical informations per IdTree (1 IdTree = 1 family, 1 scientific and 1 vernacular name)
Fill the Comment column with error type informations. If DetectOnly = FALSE, add columns:
Family_TreeDataCor
(character): corrected Family name
FamilyCorSource
(character): source of the Family correction
Genus_TreeDataCor
(character): corrected Genus name
Species_TreeDataCor
(character): corrected Species name
BotanicalCorrectionSource
(character): source of the Genus and Species
correction
ScientificName_TreeDataCor
(character): corrected Scientific name
VernName_TreeDataCor
(character): completed if information available at
IdTree
level.
## Not run:
library(data.table)
data(TestData)
# With The Plant List:
Rslt <- BotanicalCorrection(TestData, Source = "TPL")
ScfcCor <- unique(Rslt[ScientificNameCor != ScientificName,
list(ScientificName, ScientificNameCor,
Family, FamilyCor, FamilyCorSource,
Genus, GenusCor,
Species, SpeciesCor, Subspecies,
BotanicalCorrectionSource, Comment)
])
FamCor <- unique(Rslt[FamilyCor != Family,
list(ScientificName, ScientificNameCor,
Family, FamilyCor, FamilyCorSource,
Genus, GenusCor,
Species, SpeciesCor, Subspecies,
BotanicalCorrectionSource, Comment)
])
# With World Flora Online:
WFO_Backbone <- file.choose()
load(WFO_Backbone)
RsltWFO <- BotanicalCorrection(TestData, Source = "WFO", WFOData = WFO_Backbone)
ScfcCor <- unique(RsltWFO[ScientificNameCor != ScientificName,
list(ScientificName, ScientificNameCor,
Family, FamilyCor,
Genus, GenusCor,
Species, SpeciesCor, Subspecies,
BotanicalCorrectionSource, Comment)
])
FamCor <- unique(RsltWFO[FamilyCor != Family,
list(ScientificName, ScientificNameCor,
Family, FamilyCor,
Genus, GenusCor,
Species, SpeciesCor, Subspecies,
BotanicalCorrectionSource, Comment)
])
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.