AdeelK93 / collapsibleTree

Create Interactive Collapsible Tree Diagrams in R using D3.js
https://adeelk93.github.io/collapsibleTree/
158 stars 41 forks source link

coallapsibleTree function on data.tree #6

Closed steadyfish closed 7 years ago

steadyfish commented 7 years ago

Hi @AdeelK93 ,

Re: #4 , I've taken generic function approach to create a new function collapsibleTree.Node() to achieve this. Most of the code in this function is similar to earlier collapsibleTree function except that snippet for validating data.frame and creating data.tree has been removed.

Let me know what you think.

AdeelK93 commented 7 years ago

Using S3 methods is a great idea, I like it!

I'm getting 1 error, 2 warnings, and 1 note when checking the package though (in RStudio using the 'Check' button or running devtools::check(args = c('--as-cran')) in the console). They appear to be related to issues with the examples and S3 method consistency. Would you be alright with tweaking the PR to get the CRAN checks to pass?

steadyfish commented 7 years ago

Made changes to pass cran checks. Let me know if this works.

AdeelK93 commented 7 years ago

This looks really great! If you'd like, you can update the DESCRIPTION file and include yourself as a contributor with the line person("First", "Last", role = "ctb").

I'm going to refactor collapsibleTreeSummary to use the same strategy in the meanwhile

steadyfish commented 7 years ago

Won't be able to submit updated DESCRIPTION file to this PR as it is closed. I could either create a new PR or you could update Author tag to this - Author: Adeel Khan [aut, cre], Michael Bostock [ctb, cph] (D3.js library), Dhrumin Shah [ctb]

AdeelK93 commented 7 years ago

Thanks, I updated the DESCRIPTION file!