taxa icon indicating copy to clipboard operation
taxa copied to clipboard

Function to produce html/latex table of taxonomic and associated data ?

Open zachary-foster opened this issue 7 years ago • 3 comments

It would be cool to be able have a function to produce tables like this from taxmap objects for use in Rmarkdown documents and publications:

image

It could output a table produced by kableExtra with a command like the following:

tax_kable(my_taxmap_obj, 
          ranks = c("Phylum", "Class", "Order", "Family", "Genus"), 
          data = c("OTUs represented" = "otu_count", "All roots" = "root_prop", "All soils" = "soil_prop"), 
          ...)

Things like "root_prop" would be user-specific variables accessible by all_names (table columns in the taxmap object) and ... would be passed to kable or kableExtra.

zachary-foster avatar Apr 18 '19 19:04 zachary-foster

cool idea! would it require a bunch of dependencies?

sckott avatar Apr 23 '19 17:04 sckott

I think it would just need knitr and kableExtra. I imagine most people would have knitr anyway, but I am not sure how many dependencies kableExtra has.

I was thinking about separating the plotting of heat trees from metacoder into a new package focused on visualization of hierarchical data, and reserving metacoder for microbiome community ecology type stuff. If not in the taxa package, this might be good in the package that heat trees go in.

zachary-foster avatar Apr 23 '19 20:04 zachary-foster

that sorta makes sense i think, if you're going to break out a new pkg focusing on plotting, then might make sense to put this fxn in that pkg

sckott avatar Apr 24 '19 16:04 sckott