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

Extra white space in gg_miss_upset() output in R notebooks #259

Open
VectorPosse opened this issue Jun 27, 2020 · 7 comments
Open

Extra white space in gg_miss_upset() output in R notebooks #259

VectorPosse opened this issue Jun 27, 2020 · 7 comments
Milestone

Comments

@VectorPosse
Copy link

When running gg_miss_upset() in an R notebook in RStudio, there is an extra box of output that consists of nothing but white space. In the corresponding HTML file, there is an appreciable length of vertical white space appearing between the code chunk and the upset plot.

Reprex:

---
title: "gg_miss_upset bug"
output: html_notebook
---

```{r}
library(naniar)
data(airquality)
gg_miss_upset(airquality)
```

Version info:

R 4.0.2:

platform       x86_64-w64-mingw32          
arch           x86_64                      
os             mingw32                     
system         x86_64, mingw32             
status                                     
major          4                           
minor          0.2                         
year           2020                        
month          06                          
day            22                          
svn rev        78730                       
language       R                           
version.string R version 4.0.2 (2020-06-22)
nickname       Taking Off Again        

RStudio 1.3.959

$mode
[1] "desktop"

$version
[1] ‘1.3.959’

$release_name
[1] "Middlemist Red"

Screenshot:

upset_plot_issue

@njtierney
Copy link
Owner

Hi there,

I'm not sure why this is the case - under the hood this calls the UpSetR package, which appears to not be well maintained at the moment, so I may need to look into changing the implementation.

Does this produce problems when rendering to HTML/PDF/Word?

@VectorPosse
Copy link
Author

So it may be an R notebook issue. When I preview to HTML (creating a .nb.html file), the space appears. But knitting to HTML does not cause a space. Neither is there a space after knitting to PDF or Word.

@njtierney
Copy link
Owner

OK that's good to know, bit frustrating about the empty space in the .nb.html file though. Is it only the upset plot that creates the extra space in the .nb.html files, or is it in other types of plot output as well?

@njtierney
Copy link
Owner

If it's just the upset plot, I'll see if I can take a closer look at what the notebooks are doing and how the upset plot is generated.

@VectorPosse
Copy link
Author

VectorPosse commented Aug 17, 2020 via email

@andrader
Copy link

I have the exact same problem. Did you manage to find a solution?

@njtierney njtierney added this to the V0.7.0 milestone Oct 14, 2022
@njtierney
Copy link
Owner

njtierney commented Apr 10, 2023

It seems that this is an issue with UpSetR - the best solution I can think of to resolve this is

  1. Use an alternative upset plot or
  2. Write my own

I'm a bit busy with doing a bunch of small maintenance fixes at the moment so I might consolidate some of the issues with UpSetR and leave it as it is for the time being

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants