AdeelK93 / collapsibleTree

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

Varying depth #3

Closed ShKlinkenberg closed 7 years ago

ShKlinkenberg commented 7 years ago

Hi Adeel,

I'm getting errors when I try to make tree diagrams wit varying depth My repo. Is there a work around? I could not vind it in the manual.

Kind regards, Sharon

ShKlinkenberg commented 7 years ago

Solved. The readxl import added NA's that gave an issue. Converting NA's to string "" solved the depth issue

AdeelK93 commented 7 years ago

Huh! I had opted to just throw an error if a table had NA's because data.tree would throw a more confusing error, do you think this might be a better default?

Hadn't given enough thought to trees with varying depths until now

ShKlinkenberg commented 7 years ago

The NA's are a natural result of varying depth trees. What I did now is:

` tree <- read_excel("file.xlsx")

assessment.tree[is.na(tree)] <- "" `

I think it would be good to have your widget handle this. It took me some time to figure out that this worked.

None the less, great widget. Thanks a lot for building it!

AdeelK93 commented 7 years ago

Sorry this took so long to get to, but I implemented your suggestion, thank you!

ShKlinkenberg commented 7 years ago

Cool!

Thanks


Universiteit van Amsterdam

Sharon Klinkenberg

Bezoek | Nieuwe Achtergracht 129Bhttps://mapkit.io/embed/cq4eoa | Kamer REC-G -1.12 (Souterrain) Post | Postbus 15943 | 1001 NK Amsterdam Pakketpost | Valckenierstraat 59 | 1018 XE Amsterdam T: +31 (0)20 525 6904 | S.Klinkenberg@uva.nl

From: Adeel Khan notifications@github.com Reply-To: AdeelK93/collapsibleTree reply@reply.github.com Date: Thursday, 4 May 2017 at 03:29 To: AdeelK93/collapsibleTree collapsibleTree@noreply.github.com Cc: Sharon Klinkenberg S.Klinkenberg@uva.nl, Author author@noreply.github.com Subject: Re: [AdeelK93/collapsibleTree] Varying depth (#3)

Sorry this took so long to get to, but I implemented your suggestion, thank you!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/AdeelK93/collapsibleTree/issues/3#issuecomment-299078671, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AEs-VHn7pUlDdb0R79XOvvbwa3WsSy4-ks5r2SoAgaJpZM4M1jsO.