Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabular data for `taxonomy` class #105

Merged
merged 4 commits into from Dec 16, 2017
Merged

Tabular data for `taxonomy` class #105

merged 4 commits into from Dec 16, 2017

Conversation

@sckott
Copy link
Member

@sckott sckott commented Dec 15, 2017

related to #58

Still would need to do for taxmap but first wanted to get your feedback on this @zachary-foster sine you're i think more familiar with the taxonomy and taxmap classes. Does this change look good? Do you want it set up differently? Different fxn name? Or as a parameter inside of get_data?

## hier1 etc. from `taxonomyegs` file
x <- taxonomy(hier1, hier2, hier3)
x$get_data_frame()
#> # A tibble: 9 x 12
#>           taxon_names taxon_ids taxon_indexes n_supertaxa n_supertaxa_1 n_subtaxa
#> *               <chr>     <chr>         <int>       <dbl>         <dbl>     <dbl>
#> 1            Mammalia         b             1           0             0         8
#> 2        Notoryctidae         c             2           1             1         2
#> 3             Felidae         d             3           1             1         4
#> 4          Notoryctes         e             4           2             1         1
#> 5                Puma         f             5           2             1         1
#> 6            Panthera         g             6           2             1         1
#> 7 Notoryctes typhlops         h             7           3             1         0
#> 8       Puma concolor         i             8           3             1         0
#> 9     Panthera tigris         j             9           3             1         0
#> # ... with 6 more variables: n_subtaxa_1 <dbl>, taxon_ranks <chr>, is_root <lgl>,
#> #   is_stem <lgl>, is_branch <lgl>, is_leaf <lgl>
sckott added 3 commits Dec 15, 2017
added s3 method for get_data_frame
updated docs
@sckott
Copy link
Member Author

@sckott sckott commented Dec 15, 2017

@zachary-foster build is failing - i'm guessing cause the example object hasn't been refreshed. How do you go about doing that for the taxonomy and taxmap example objects

@zachary-foster
Copy link
Collaborator

@zachary-foster zachary-foster commented Dec 15, 2017

Looks good at first glance! I have a series of meetings today so I cant look at it in detail until tonight.

How do you go about doing that for the taxonomy and taxmap example objects

Run the code in ?taxmap and devtools::use_data(ex_taxmap, overwrite = TRUE). Same for taxonomy. I wonder if we can automate this every time the package is built or a commit is made?

@sckott
Copy link
Member Author

@sckott sckott commented Dec 15, 2017

ok, thanks. That would be cool to automate the example data objects updates. Will open a sep. issue about it so we don't forget

@zachary-foster
Copy link
Collaborator

@zachary-foster zachary-foster commented Dec 16, 2017

LGTM

@zachary-foster zachary-foster merged commit d6984a0 into master Dec 16, 2017
0 of 2 checks passed
0 of 2 checks passed
continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/travis-ci/push The Travis CI build failed
Details
@sckott
Copy link
Member Author

@sckott sckott commented Dec 18, 2017

i have a bit of fixing to do to this i found out, will push that soon

sckott added a commit that referenced this pull request Dec 18, 2017
stops now when variables are of unequal length
sckott added a commit that referenced this pull request Dec 18, 2017
…/gitignore scott notes md file, bump dev ver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.