Giter Club home page Giter Club logo

Comments (1)

zachary-foster avatar zachary-foster commented on July 29, 2024

What do you think about how the names of lists and vectors are turned to NA when all associated taxa are filtered out, but observations are retained with taxonless = TRUE?

Also, related to issue #38, what do you think about changing the taxonless option name to remove_obs?

> (x = filter_taxa(ex_taxmap, taxon_names == "Plantae", subtaxa = TRUE, taxonless = TRUE))
<Taxmap>
  5 taxa: 2. Plantae, 6. Solanaceae, 11. Solanum, 16. lycopersicum, 17. tuberosum
  5 edges: NA->2, 2->6, 6->11, 11->16, 11->17
  3 data sets:
    info:
      # A tibble: 6 × 4
          name n_legs dangerous taxon_id
        <fctr>  <dbl>     <lgl>    <chr>
      1  tiger      4      TRUE     <NA>
      2    cat      4     FALSE     <NA>
      3   mole      4     FALSE     <NA>
      # ... with 3 more rows
    phylopic_ids:  e148eabb-f138-43c6-b1e4-5cda2180485a ... b6400f39-345a-4711-ab4f-92fd4e22cb1a, 63604565-0406-460b-8cb8-1abe954b3f3a
    foods: a list with 6 items
  1 functions:
 reaction
> x$data
$info
# A tibble: 6 × 4
    name n_legs dangerous taxon_id
  <fctr>  <dbl>     <lgl>    <chr>
1  tiger      4      TRUE     <NA>
2    cat      4     FALSE     <NA>
3   mole      4     FALSE     <NA>
4  human      2      TRUE     <NA>
5 tomato      0     FALSE       16
6 potato      0     FALSE       17

$phylopic_ids
                                  <NA>                                   <NA>                                   <NA> 
"e148eabb-f138-43c6-b1e4-5cda2180485a" "12899ba0-9923-4feb-a7f9-758c3c7d5e13" "11b783d5-af1c-4f4e-8ab5-a51470652b47" 
                                  <NA>                                     16                                     17 
"9fae30cd-fb59-4a81-a39c-e1826a35f612" "b6400f39-345a-4711-ab4f-92fd4e22cb1a" "63604565-0406-460b-8cb8-1abe954b3f3a" 

$foods
$foods$<NA>
[1] "mammals" "birds"  

$foods$<NA>
[1] "cat food" "mice"    

$foods$<NA>
[1] "insects"

$foods$<NA>
[1] "Most things, but especially anything rare or expensive"

$foods$`16`
[1] "light" "dirt" 

$foods$`17`
[1] "light" "dirt" 

from taxa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.