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

Problem with NAs in the first row #44

Open
jtr13 opened this issue Mar 11, 2021 · 1 comment
Open

Problem with NAs in the first row #44

jtr13 opened this issue Mar 11, 2021 · 1 comment

Comments

@jtr13
Copy link

jtr13 commented Mar 11, 2021

Thank you for a fantastic package!

There seems to be an odd error: If there is an NA in the first row, the plot doesn't render.

For example, this works:

df <- data.frame(a = 1:2, b = 3:4, c = c(5, NA))
parcoords::parcoords(df)

but this doesn't:

df <- data.frame(a = 1:2, b = 3:4, c = c(NA, 5))
parcoords::parcoords(df)
@timelyportfolio
Copy link
Owner

timelyportfolio commented Mar 16, 2021

@jtr13 thanks so much for filing the issue and reminding me that there are users of parcoords :) As soon as I read, this should have been obvious, but I had not considered before. Unfortunately the underlying library does not currently support. I would think naniar https://cran.r-project.org/web/packages/naniar/vignettes/naniar-visualisation.html would give us some thoughts on how to treat NA. It seems like we would need a custom d3 scale that includes NA, since we lose information by not showing and I think lose pattern/connection if we depict as a gap.

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