Closed kamapu closed 7 months ago
Some aspects to consider on developing the new functions:
df2taxlist()
but I plan to do some improvements on it.df <- as(taxlist, "data.frame")
I think you mean dwctaxon, not taxastand?
Anyways, dwctaxon has recently been submitted for review by rOpenSci, and I intend to submit to CRAN after it passes.
I suggest to define a separated function, such as dwc2taxlist()
or similar. Function df2taxlist()
is written as a data.frame-method and checks mandatory columns in the input data. Once ready, we can insert a check in df2taxlist()
that can recognize a standard column form DWC and automatically use this function to create the taxlist object. It is only an idea, though.
Time has passed @joelnitta. I was looking at a vignette for dwctaxon
and noticed that you use tibbles as the class for the tables you handle. I am afraid that including dwctaxon
as a dependency for taxlist
might imply that several packages from tidyverse become dependencies for taxlist
as well, and I would like to avoid that. Instead, I will take care of the coercion routines for data.frames, which need to take Darwin Core into account. From there to tibble may be just one more step.
TODO:
taxlist2df()
with an alternative use of the Darwin Core to call columns (probably a hidden conversion table will be needed)df2taxlist()
in the reverse wayas()
)Hier it is the conversion table used by taxlist
:
taxlist:::dwc_table
dwc taxlist
1 taxonID TaxonConceptID
2 scientificNameID TaxonUsageID
3 acceptedNameUsageID AcceptedName
4 originalNameUsageID Basionym
5 nameAccordingToID ViewID
6 scientificName TaxonName
7 taxonRank Level
8 scientificNameAuthorship AuthorName
New functions are needed to import and export data using the Darwin Core Standard. These functions may depend on functions of the package taxastand.