Open zachary-foster opened 7 years ago
started working on this in e1f1a8f3bd2df3ff91dbf35de5a8490c59c1c0cd (accidentally used commit message I meant to use for taxize
- what should have said was related to this issue)
attributes
to taxon
- they have to be a named listtaxon
to print attributes if givenurl
input to taxon_id
taxon
to print URL from taxon_id
if a URL given(work on this is on branch https://github.com/ropensci/taxa/tree/taxize-compat-changes )
@zachary-foster For taxa
, hierarchy
, etc. How did you image changing these print methods, seems especially hairy since they are arbitrary, so not sure if you imagined printing number of attributes, their names, something else?
Hmmm, I think the best way would be to have multiple "print handler" functions for common types (vectors, tables, functions, etc). These would be in a list named by their target class. If the class of the object is not handled by one of these functions, just its name and class are printed. Maybe its length if it is a list. I think that is how I handled the arbitrary data that can be in taxmap$data
.
okay, makes sense
Hi @sckott, I made the print method system I described above for taxmap objects in my most recent commit:
https://github.com/ropensci/taxa/blob/master/R/taxmap--printers.R
I thought it was already set up that way, but I guess I just imagined it. It might be a useful starting point for the taxa attributes printing or it might work for both the taxa and taxmap print methods. Not sure yet
thanks, will take a look
taxon
taxon
taxa
hierarchy
hierarchies
taxonomy
taxmap
to move data fromtaxon
objects to tables / lists. Perhaps add an option to control if data is moved / copied?taxmap
totaxa
. Move data totaxon
objects.taxmap
tohierarchies
. Move data totaxon
objects.taxmap
totaxonomy
. Move data totaxon
objects.