From 4a5e3f01d70aab74a6aa029addf7babc8b6d7c44 Mon Sep 17 00:00:00 2001 From: krassowski <5832902+krassowski@users.noreply.github.com> Date: Fri, 11 Nov 2022 16:02:36 +0000 Subject: [PATCH 1/4] Fix CRAN check note --- R/upset.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/upset.R b/R/upset.R index ecd8783..a91398f 100644 --- a/R/upset.R +++ b/R/upset.R @@ -962,7 +962,7 @@ upset = function( mode = solve_mode(mode) - if (class(base_annotations) == 'character') { + if (inherits(base_annotations, 'character')) { if (base_annotations != 'auto') { stop('Unsupported value for `base_annotations`: provide a named list, or `"auto"`') } else { @@ -973,7 +973,7 @@ upset = function( } # for backwards compatibility pre 1.2 - if (class(stripes) != 'upset_stripes') { + if (!inherits(stripes, 'upset_stripes')) { stripes = upset_stripes(colors=stripes) } From 26d1b791b5eea6708b4a6d20683dd33e2b934302 Mon Sep 17 00:00:00 2001 From: krassowski <5832902+krassowski@users.noreply.github.com> Date: Fri, 11 Nov 2022 16:19:51 +0000 Subject: [PATCH 2/4] =?UTF-8?q?Revert=20size=20=E2=86=92=20linewidth=20to?= =?UTF-8?q?=20retain=20compatibility?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- R/upset.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/upset.R b/R/upset.R index a91398f..6d38f36 100644 --- a/R/upset.R +++ b/R/upset.R @@ -196,7 +196,7 @@ matrix_background_stripes = function(data, stripes, orient='horizontal') { #' @param colors a vector of colors to repeat as many times as needed for the fill of stripes, or a named vector specifying colors for values of the variable mapped to the color aesthetics in the mapping argument #' @param data the dataset describing the sets with a column named `set` and any other columns as needed for mapping #' @export -upset_stripes = function(mapping=aes(), geom=geom_segment(linewidth=7), colors=c('white', 'grey95'), data=NULL) { +upset_stripes = function(mapping=aes(), geom=geom_segment(size=7), colors=c('white', 'grey95'), data=NULL) { stripes = list( mapping=mapping, geom=geom, From 4cbd7fbe50a84b6bb6c001b2c4c907ca26022936 Mon Sep 17 00:00:00 2001 From: krassowski <5832902+krassowski@users.noreply.github.com> Date: Fri, 11 Nov 2022 16:22:21 +0000 Subject: [PATCH 3/4] Bump version, update documentation --- DESCRIPTION | 2 +- NEWS.md | 8 ++++++++ man/upset_stripes.Rd | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 447de16..d0ea049 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: ComplexUpset Type: Package Title: Create Complex UpSet Plots Using 'ggplot2' Components -Version: 1.3.4 +Version: 1.3.5 Authors@R: person( "Michał", "Krassowski", email = "krassowski.michal+r@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-9638-7785")) diff --git a/NEWS.md b/NEWS.md index c925040..57cf9a8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,11 @@ +# Version 1.3.5 + +2022-11-11 + +Maintenance: +- Revert `size` → `linewidth` migration for now to retain compatibility with older ggplot2 versions +- Use `inherits` to satisfy CRAN checks + # Version 1.3.4 2022-11-11 diff --git a/man/upset_stripes.Rd b/man/upset_stripes.Rd index 3359170..88d2924 100644 --- a/man/upset_stripes.Rd +++ b/man/upset_stripes.Rd @@ -6,7 +6,7 @@ \usage{ upset_stripes( mapping = aes(), - geom = geom_segment(linewidth = 7), + geom = geom_segment(size = 7), colors = c("white", "grey95"), data = NULL ) From 6b5be4e243508ea6505e56ad2a6e80e3e0bc6dfa Mon Sep 17 00:00:00 2001 From: krassowski <5832902+krassowski@users.noreply.github.com> Date: Fri, 11 Nov 2022 16:28:25 +0000 Subject: [PATCH 4/4] Add new lines to satisfy `pkgdown` markdown parser --- NEWS.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/NEWS.md b/NEWS.md index 57cf9a8..bec2a06 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,7 @@ 2022-11-11 Maintenance: + - Revert `size` → `linewidth` migration for now to retain compatibility with older ggplot2 versions - Use `inherits` to satisfy CRAN checks @@ -11,9 +12,11 @@ Maintenance: 2022-11-11 Enhancements: + - Accept `tibble`s in `arrange_venn`, thanks @maximilian-heeg! #159 Maintenance: + - Pass `width=0.9` to workaround change of behaviour in ggplot2 3.4 overextending the width of bars highlighted with `upset_query` - Fix deprecation warnings for ggplot 3.4 `size` to `linewidth` transition @@ -22,6 +25,7 @@ Maintenance: 2021-12-07 Bug fixes: + - Makes zero-degree intersection size for `intersections='all'` mode follow the same behavior as the bar plot #144 # Version 1.3.2 @@ -29,6 +33,7 @@ Bug fixes: 2021-12-06 Bug fixes: + - Enable displaying degree 0 intersection with `group_by='sets'`. The old behavior of not displaying degree zero intersection can be achieved by using `min_degree=1` argument #143 # Version 1.3.1 @@ -36,6 +41,7 @@ Bug fixes: 2021-08-04 Fixes: + - use `guide="none"` instead of `guide=FALSE` to silence ggplot2 deprecation warning, thanks @MilouArts! #129 # Version 1.3.0 @@ -43,9 +49,11 @@ Fixes: 2021-06-06 Changes: + - sets on intersection matrix can now be highlighted using `upset_query()` #115 Bug fixes: + - alleviate visual glitch of `geom_segment` in intersections matrix showing up with an outline #113 - fixed aesthetics assigned by `upset_query()` which was sometimes not behaving as expected #123 @@ -54,6 +62,7 @@ Bug fixes: 2021-04-25 Bug fixes: + - fixed metadata order in data frame returned by `arrange_venn()` function #116 # Version 1.2.0 @@ -61,16 +70,19 @@ Bug fixes: 2021-04-03 Bug fixes: + - [critical] fixed display order of labels when using `encode_sets=TRUE` #110 - encoding of set names will now properly work around name conflicts #110 Major improvements: + - manually specified intersections will now display empty intersections and non-exclusive intersections correctly #109 - manually specified intersections do not require modifying the `intersect` argument to obtain the intended result any longer #109 - stripes size and other attributes of underlying `geom_segment()` can now be customised with new function: `upset_stripes()` #111 - stripes colour and other attributes can now be mapped to data #111 Minor improvements: + - data.table can be passed instead of data.frame (the conversion will be performed automatically) #105 - warning will be shown if a vector is provided instead of a list to the `intersections` argument #109 - when `intersections` argument includes sets not specified in `intersect`, a warning will be issued and execution will proceed as if those were included in `intersect` #109 @@ -81,6 +93,7 @@ Minor improvements: 2021-01-13 New features: + - it is now possible to select specific intersections passing `intersections = list('Drama', c('Comedy', 'Romance'))` - it is now possible to define custom order of intersections passing `intersections = list('Drama', c('Comedy', 'Romance'))` and `sort_intersections = FALSE` @@ -89,6 +102,7 @@ New features: 2021-01-05 Bug fixes: + - Major performance and memory use improvements, especially when using `intersections = 'all'` - The `max_combinations_n` fail-safe was replaced by a more useful `max_combinations_datapoints_n` with more precise error message - The atypical use case of filtering with `max_degree = 0` is now accepted again @@ -99,6 +113,7 @@ Bug fixes: 2021-01-04 Bug fixes: + - Fixed regression of non-observed sets causing "no vector columns were selected" caused by fix addressing #90 - Reduced length of file names for some test doppelgangers @@ -107,6 +122,7 @@ Bug fixes: 2021-01-04 Bug fixes: + - Filtering by degree when using non-default mode and `intersections='all'` now correctly accounts for all observations (#89) - Empty sets/groups are now correctly removed when filtering with a non-default mode (#90) - Missing values are now converted to FALSE and a warning is issued to the user rather than causing an undefined behavior (#88) @@ -116,6 +132,7 @@ Bug fixes: 2020-12-30 Changes: + - Lists with computed sizes are now returned in a single list called `sizes` by `upset_data()` - Set sizes are now **not** filtered by default when selecting intersections by `min_*` or `max_*` criteria. Pass `filter_intersections=TRUE` to `upset_set_sizes()` to restore the previous behaviour - Union sizes are now calculated before data trimming which provides more accurate ratio estimates @@ -125,12 +142,14 @@ Changes: - `min_max_early` argument is no longer required and was removed New features: + - Annotations can now access data for any of the available modes by adding `upset_mode()` layer. By default the annotations are given data corresponding to the same mode as the mode of the passed in the `upset()` call. - It is now possible to display all intersections, even if those are not present in the data by passing `intersections='all'` to `upset()`; this is only feasible for <20 sets, but filtering by degree can allow to explore a subset of all intersections when there are many more sets; this is only useful for modes different from the default exclusive intersection. - If filtering leads to no intersections, an informative error is shown (#80) Bug fixes: + - Modes passed to `upset()` are now also used for sorting and trimming - Size calculation for modes was optimised for better performance - User-added layers are now shown on top of `intersection_size()` and `intersection_union()` @@ -141,6 +160,7 @@ Bug fixes: 2020-12-20 Changes: + - Pass metadata to the `ggplot2` when arranging Venn diagram, allowing to map elements aesthetics details # Version 0.9.0 @@ -148,13 +168,16 @@ Changes: 2020-12-20 New features: + - Intersection modes were formalised with the default remaining `exclusive_intersection` (alias `distinct`); additional modes are: `inclusive_intersection` (alias `intersect`), `inclusive_union` and `exclusive_union`; please read the [relevant part of the documentation](https://krassowski.github.io/complex-upset/articles/Examples_R.html#0-2-region-selection-modes) for details (#78). - Simple Venn diagrams (for two or three sets) can now be constructed using same input (binary presence data frame) using pseudo geoms: `geom_venn_circle()`, `geom_venn_label_region()`, `geom_venn_label_set()`, `geom_venn_region()` and scales `scale_color_venn_mix()` and `scale_fill_venn_mix()`; while developed mostly for the documentation needs, it provides unique capability of highlighting relevant regions of the Venn diagram and placing observations within appropriate regions (which allows to demonstrate their attributes with appropriate aesthetics mapping). Changes: + - Breaking: union size for "empty" intersection is now equal to its size Bug fixes: + - Layers added to `upset_set_size()` and `intersection_matrix()` will now always go on top (avoiding geoms being hidden underneath) - Declare layer in NAMESPACE to allow basic usage without loading `ggplot2` - `upset_query()` will now throw an informative error when the user forgets to pass any aesthetics (#79)