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

rootLabel in sund2b is not working #114

Open
ManuelSpinola opened this issue Jun 11, 2022 · 1 comment
Open

rootLabel in sund2b is not working #114

ManuelSpinola opened this issue Jun 11, 2022 · 1 comment

Comments

@ManuelSpinola
Copy link

The rootLabel argument in sund2b is not working

sequences <- read.csv(
system.file("examples/visit-sequences.csv",package="sunburstR")
,header = FALSE
,stringsAsFactors = FALSE
)[1:200,]

sund2b(sequences, rootLabel = "raíz")

@timelyportfolio
Copy link
Owner

timelyportfolio commented Jun 13, 2022

@ManuelSpinola looks like there is a bug here. I have submitted a patch in the master branch of Github that should fix the problem.

# devtools::install_github("timelyportfolio/sunburstR")
sequences <- read.csv(
system.file("examples/visit-sequences.csv",package="sunburstR")
,header = FALSE
,stringsAsFactors = FALSE
)[1:200,]

sund2b(sequences, rootLabel = "raíz")

For additional information, providing JSON hierarchy with d3_nest is much more robust than the original csv method. d3_nest provides an argument root that allows specification of the root name/label for the hierarchy.

timelyportfolio added a commit that referenced this issue Jun 13, 2022
…et `rootLabel` argument work again with `sund2b()`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants