ropensci / taxa

taxonomic classes for R
https://docs.ropensci.org/taxa
Other
48 stars 12 forks source link

taxmap/taxonomy print method change idea #147

Open zachary-foster opened 6 years ago

zachary-foster commented 6 years ago
<Taxonomy>
  17 taxa: b. Mammalia, c. Plantae, d. Felidae, e. Notoryctidae ... o. typhlops, p. sapiens, q. lycopersicum, r. tuberosum
  17 edges: NA->b, NA->c, b->d, b->e, b->f, c->g, d->h, d->i, e->j, f->k, g->l, h->m, i->n, j->o, k->p, l->q, l->r

Could be:

<Taxonomy> of 17 taxa
  taxon_names: Mammalia Plantae Felidae Notoryctidae ... typhlops sapiens lycopersicum tuberosum
  taxon_ranks: class    kingdom family  family       ... species  species species      species
  taxon_ids  : b        c       d       e            ... o        p       q            r    
  supertaxa  : NA       NA      b       b            ... j        k       l            l

Easer to understand I think and bit better use of horizontal space, although more vertical space. ranks would only show up if set.

What do you think @sckott?

sckott commented 6 years ago

I like the idea. Are there always the same number of edges as taxa?

zachary-foster commented 6 years ago

I like the idea.

Nice!

Are there always the same number of edges as taxa?

Yes, since "root" taxa have a parent of NA.

sckott commented 6 years ago

Okay, then all sounds good, was just thinking if taxa and edges may not be the same, but not a problem