#> # A tibble: 5 × 6
#> expression min median `itr/sec` mem_alloc `gc/sec`
#> <bch:expr> <bch:tm> <bch:tm> <dbl> <bch:byt> <dbl>
-#> 1 heatmap() 150.61ms 153.62ms 6.50 139.11MB 4.88
-#> 2 heatmap.2() 2.32s 2.32s 0.431 224.23MB 1.73
-#> 3 Heatmap() 4.78s 4.78s 0.209 792.59MB 2.51
-#> 4 pheatmap() 597.5ms 597.5ms 1.67 124.1MB 0
-#> 5 ggalign() 2.11s 2.11s 0.474 2.51GB 9.48
+#> 1 heatmap() 149.64ms 154.02ms 6.50 139.11MB 4.87
+#> 2 heatmap.2() 2.35s 2.35s 0.426 224.23MB 1.70
+#> 3 Heatmap() 4.79s 4.79s 0.209 792.59MB 2.51
+#> 4 pheatmap() 601.72ms 601.72ms 1.66 124.1MB 0
+#> 5 ggalign() 2.12s 2.12s 0.471 2.51GB 9.43
For heatmap with dendrogram
bench::mark(
@@ -217,11 +217,11 @@
+#> 1 heatmap() 2.66s 2.66s 0.376 173.72MB 2.63
+#> 2 heatmap.2() 2.92s 2.92s 0.342 223.41MB 2.74
+#> 3 Heatmap() 6s 6s 0.167 1.51GB 2.00
+#> 4 pheatmap() 2.32s 2.32s 0.431 177.53MB 0.431
+#> 5 ggalign() 5.15s 5.15s 0.194 2.58GB 4.85
diff --git a/dev/pkgdown.yml b/dev/pkgdown.yml
index 7c187573..2bd2d5bb 100644
--- a/dev/pkgdown.yml
+++ b/dev/pkgdown.yml
@@ -4,7 +4,7 @@ pkgdown_sha: ~
articles:
articles/benchmarks: benchmarks.html
articles/FAQ: FAQ.html
-last_built: 2025-01-06T18:31Z
+last_built: 2025-01-06T18:59Z
urls:
reference: https://yunuuuu.github.io/ggalign/reference
article: https://yunuuuu.github.io/ggalign/articles
diff --git a/dev/search.json b/dev/search.json
index 9630b97c..5cad2774 100644
--- a/dev/search.json
+++ b/dev/search.json
@@ -1 +1 @@
-[{"path":[]},{"path":"https://yunuuuu.github.io/ggalign/dev/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement yunyunp96@163.com. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 ggalign authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/articles/FAQ.html","id":"can-i-change-the-default-data-for-all-geoms","dir":"Articles","previous_headings":"","what":"Can I change the default data for all geoms?","title":"FAQ","text":"function ggalign requires specific data formats operations. need transform filter data individual geoms, can use data argument within geom. However, multiple geoms want consistent transformation applied across , can utilize scheme_data() function allows transform default data additive geoms.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/articles/FAQ.html","id":"why-are-there-spaces-after-setting-all-plot-margin-to-zero","dir":"Articles","previous_headings":"","what":"Why are there spaces after setting all plot.margin to zero?","title":"FAQ","text":"default, ggalign doesn’t add spaces plots. notice spaces, likely due : Plot margins within individual plots. Scale expansion automatically added ggplot2. can resolve removing scale expansion adjusting margins theme:","code":"ggheatmap(small_mat) + anno_top() + align_dendro(aes(color = branch), k = 3L) + scale_y_continuous(expand = expansion()) & theme(plot.margin = margin()) #> → heatmap built with `geom_tile()`"},{"path":"https://yunuuuu.github.io/ggalign/dev/articles/FAQ.html","id":"why-cant-i-add-two-dendrograms-with-different-reorder-settings","dir":"Articles","previous_headings":"","what":"Why can’t I add two dendrograms with different reorder settings?","title":"FAQ","text":"Note: always prevent users reordering layout direction twice. reorder_group = FALSE used, reordering heatmap occurs within group. long ordering within group remains consistent, two dendrograms can placed axis heatmap. Let’s assume panels represents group observation index represents ordered index observations. code provided, panels initialized ungrouped index unordered: add dendrogram reorder_group = FALSE; ’ll something like (Since reorder_group = FALSE, panels won’t changed): However, dendrogram reorder_group = TRUE added, reorder panels, underlying index changed: prevent reordering axis twice, ensure new_index matches index (index NULL). done maintain consistency prevent conflicts ordering heatmap.","code":"panels <- NULL index <- NULL set.seed(2L) group <- sample(letters[1:3], ncol(small_mat), replace = TRUE) h <- ggheatmap(small_mat) + anno_top() + align_group(group) h1 <- h + align_dendro(reorder_group = FALSE, merge_dendrogram = TRUE) # always remember dendrogram will initialize the index, here, we extract the # index from the underlying dendrogram index <- stats::order.dendrogram(ggalign_stat(h1, \"top\", 2L)) h2 <- h + align_dendro(reorder_group = TRUE, merge_dendrogram = TRUE) new_index <- stats::order.dendrogram(ggalign_stat(h2, \"top\", 2L)) all(index == new_index) #> [1] FALSE"},{"path":"https://yunuuuu.github.io/ggalign/dev/articles/FAQ.html","id":"session-information","dir":"Articles","previous_headings":"","what":"Session information","title":"FAQ","text":"","code":"sessionInfo() #> R version 4.4.2 (2024-10-31) #> Platform: x86_64-pc-linux-gnu #> Running under: Ubuntu 22.04.5 LTS #> #> Matrix products: default #> BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 #> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0 #> #> locale: #> [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 #> [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 #> [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C #> [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C #> #> time zone: UTC #> tzcode source: system (glibc) #> #> attached base packages: #> [1] stats graphics grDevices utils datasets methods base #> #> other attached packages: #> [1] ggalign_0.0.5.9000 ggplot2_3.5.1 #> #> loaded via a namespace (and not attached): #> [1] vctrs_0.6.5 cli_3.6.3 knitr_1.49 rlang_1.1.4 #> [5] xfun_0.49 generics_0.1.3 textshaping_0.4.1 jsonlite_1.8.9 #> [9] labeling_0.4.3 glue_1.8.0 colorspace_2.1-1 htmltools_0.5.8.1 #> [13] ragg_1.3.3 sass_0.4.9 scales_1.3.0 rmarkdown_2.29 #> [17] grid_4.4.2 tibble_3.2.1 evaluate_1.0.1 munsell_0.5.1 #> [21] jquerylib_0.1.4 fastmap_1.2.0 yaml_2.3.10 lifecycle_1.0.4 #> [25] compiler_4.4.2 dplyr_1.1.4 fs_1.6.5 pkgconfig_2.0.3 #> [29] farver_2.1.2 systemfonts_1.1.0 digest_0.6.37 R6_2.5.1 #> [33] tidyselect_1.2.1 pillar_1.10.0 magrittr_2.0.3 bslib_0.8.0 #> [37] withr_3.0.2 tools_4.4.2 gtable_0.3.6 pkgdown_2.1.1 #> [41] cachem_1.1.0 desc_1.4.3"},{"path":"https://yunuuuu.github.io/ggalign/dev/articles/benchmarks.html","id":"compared-with-other-packages","dir":"Articles","previous_headings":"","what":"Compared with other packages","title":"Benchmarks","text":"simple heatmap. heatmap dendrogram","code":"bench::mark( \"heatmap()\" = { pdf(NULL) heatmap(mat, Rowv = NA, Colv = NA) dev.off() NULL }, \"heatmap.2()\" = { pdf(NULL) heatmap.2(mat, dendrogram = \"none\", trace = \"none\") dev.off() NULL }, \"Heatmap()\" = { pdf(NULL) draw(Heatmap(mat, cluster_rows = FALSE, cluster_columns = FALSE, use_raster = TRUE )) dev.off() NULL }, \"pheatmap()\" = { pdf(NULL) pheatmap(mat, cluster_rows = FALSE, cluster_cols = FALSE) dev.off() NULL }, \"ggalign()\" = { pdf(NULL) print(ggheatmap(mat, filling = \"raster\")) dev.off() NULL } ) #> Warning: Some expressions had a GC in every iteration; so filtering is #> disabled. #> # A tibble: 5 × 6 #> expression min median `itr/sec` mem_alloc `gc/sec` #> #> 1 heatmap() 150.61ms 153.62ms 6.50 139.11MB 4.88 #> 2 heatmap.2() 2.32s 2.32s 0.431 224.23MB 1.73 #> 3 Heatmap() 4.78s 4.78s 0.209 792.59MB 2.51 #> 4 pheatmap() 597.5ms 597.5ms 1.67 124.1MB 0 #> 5 ggalign() 2.11s 2.11s 0.474 2.51GB 9.48 bench::mark( \"heatmap()\" = { pdf(NULL) heatmap(mat) dev.off() NULL }, \"heatmap.2()\" = { pdf(NULL) heatmap.2(mat, trace = \"none\") dev.off() NULL }, \"Heatmap()\" = { pdf(NULL) draw(Heatmap(mat, row_dend_reorder = FALSE, column_dend_reorder = FALSE, use_raster = TRUE )) dev.off() NULL }, \"pheatmap()\" = { pdf(NULL) pheatmap(mat) dev.off() NULL }, \"ggalign()\" = { pdf(NULL) print(ggheatmap(mat, filling = \"raster\") + anno_top() + align_dendro() + anno_right() + align_dendro()) dev.off() NULL } ) #> Warning: Some expressions had a GC in every iteration; so filtering is #> disabled. #> # A tibble: 5 × 6 #> expression min median `itr/sec` mem_alloc `gc/sec` #> #> 1 heatmap() 2.71s 2.71s 0.370 173.72MB 2.59 #> 2 heatmap.2() 2.92s 2.92s 0.342 223.41MB 2.73 #> 3 Heatmap() 6.1s 6.1s 0.164 1.51GB 1.97 #> 4 pheatmap() 2.29s 2.29s 0.437 177.53MB 0.437 #> 5 ggalign() 5.16s 5.16s 0.194 2.58GB 4.85"},{"path":"https://yunuuuu.github.io/ggalign/dev/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Yun Peng. Author, maintainer. Shixiang Wang. Author.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Peng Y, Wang S (2025). ggalign: 'ggplot2' Extension Consistent Axis Alignment. R package version 0.0.5.9000, https://yunuuuu.github.io/ggalign/, https://github.com/Yunuuuu/ggalign.","code":"@Manual{, title = {ggalign: A 'ggplot2' Extension for Consistent Axis Alignment}, author = {Yun Peng and Shixiang Wang}, year = {2025}, note = {R package version 0.0.5.9000, https://yunuuuu.github.io/ggalign/}, url = {https://github.com/Yunuuuu/ggalign}, }"},{"path":"https://yunuuuu.github.io/ggalign/dev/index.html","id":"ggalign-","dir":"","previous_headings":"","what":"A ggplot2 Extension for Consistent Axis Alignment","title":"A ggplot2 Extension for Consistent Axis Alignment","text":"package extends ggplot2 providing advanced tools aligning organizing multiple plots, particularly automatically reorder observations, dendrogram. offers fine control layout adjustment plot annotations, enabling create complex, publication-quality visualizations still using familiar grammar ggplot2.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/index.html","id":"why-use-ggalign","dir":"","previous_headings":"","what":"Why use ggalign?","title":"A ggplot2 Extension for Consistent Axis Alignment","text":"ggalign focuses aligning observations across multiple plots. leverages \"number observations\" vctrs package NROW() function maintain consistency plot organization. ’ve ever struggled aligning plots self-contained ordering (like dendrogram), applying consistent grouping ordering across multiple plots (e.g., k-means clustering), ggalign designed make easier. package integrates seamlessly ggplot2, providing flexibility use geoms, scales, components complex visualizations.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"A ggplot2 Extension for Consistent Axis Alignment","text":"can install ggalign CRAN using: Alternatively, install development version r-universe : GitHub :","code":"install.packages(\"ggalign\") install.packages(\"ggalign\", repos = c(\"https://yunuuuu.r-universe.dev\", \"https://cloud.r-project.org\") ) # install.packages(\"remotes\") remotes::install_github(\"Yunuuuu/ggalign\")"},{"path":"https://yunuuuu.github.io/ggalign/dev/index.html","id":"learning-ggalign","dir":"","previous_headings":"","what":"Learning ggalign","title":"A ggplot2 Extension for Consistent Axis Alignment","text":"complete tutorial available : https://yunuuuu.github.io/ggalign-book/ full reference documentation, visit: https://yunuuuu.github.io/ggalign/","code":""},{"path":[]},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/LayoutProto-class.html","id":null,"dir":"Reference","previous_headings":"","what":"A Layout object — LayoutProto-class","title":"A Layout object — LayoutProto-class","text":"Layout object defines place plots.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/active.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Adding Context Settings — active","title":"Plot Adding Context Settings — active","text":"settings control behavior plot added layout, well arrangement individual plot areas within layout.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/active.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Adding Context Settings — active","text":"","code":"active(order = waiver(), use = waiver(), name = waiver())"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/active.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Adding Context Settings — active","text":"order integer specifying order plot area within layout. use logical (TRUE/FALSE) indicating whether set active context current plot added layout. TRUE, subsequent ggplot elements applied plot. name string specifying plot's name, useful switching active contexts argument functions like quad_anno()/stack_switch().","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/active.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot Adding Context Settings — active","text":"default, active context set functions add plot areas. allows ggplot2 elements-geoms, stats, scales, themes- seamlessly added current plot area. default ordering plot areas top bottom left right, depending layout orientation. However, users can customize order using order argument.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a New align Object — align","title":"Create a New align Object — align","text":"Align object interacts Layout object reorder split observations , cases, add plot components Layout.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a New align Object — align","text":"","code":"align( align, data, ..., params = list(), plot = NULL, size = NULL, schemes = NULL, no_axes = NULL, active = NULL, check.param = TRUE, call = caller_call() )"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a New align Object — align","text":"align Align object. data following options can used: NULL: data set. waiver(): Inherits data layout matrix. function (including purrr-like lambda syntax): Applied layout matrix transform data use. transform final plot data, please use scheme_data(). matrix, data.frame, atomic vector. ... Additional fields passed align object. params list parameters align. plot ggplot object. size relative size plot, can specified unit(). Note circle_layout(), size values interpreted relative sizes, layout type adjusts based available space circular arrangement. schemes Options schemes: NULL: Used align add plot. waiver(): Try infer schemes based data. no_axes Logical; TRUE, removes axes elements alignment axis using theme_no_axes(). default, use option- \"ggalign.align_no_axes\". active active() object defines context settings added layout. check.param Logical; TRUE, checks parameters provides warnings necessary. call call used construct Align object, reporting messages.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a New align Object — align","text":"new ggalign_plot object.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a New align Object — align","text":"Align* objects just ggproto() object, descended top-level Align, implements various methods fields. create new type Align* object, typically want override one following: setup_params: Prepare parameter check parameters used plot. setup_data: Prepare data used plot. compute: method used compute statistics. align: method used group observations panel reorder observations. draw: method used draw plot. Must return ggplot object.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align.html","id":"discrete-axis-alignment","dir":"Reference","previous_headings":"","what":"Discrete Axis Alignment","title":"Create a New align Object — align","text":"important note consider rows observations, meaning vec_size(data)/NROW(data) must match number observations along axis used alignment (x-axis vertical stack layout, y-axis horizontal stack layout).","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a New align Object — align","text":"","code":"align_dendro() #> #> plot: yes #> reorder: yes #> split: no"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_dendro.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot dendrogram tree — align_dendro","title":"Plot dendrogram tree — align_dendro","text":"Plot dendrogram tree","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_dendro.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot dendrogram tree — align_dendro","text":"","code":"align_dendro( mapping = aes(), ..., distance = \"euclidean\", method = \"complete\", use_missing = \"pairwise.complete.obs\", reorder_dendrogram = FALSE, merge_dendrogram = FALSE, reorder_group = FALSE, k = NULL, h = NULL, cutree = NULL, plot_dendrogram = TRUE, plot_cut_height = NULL, root = NULL, center = FALSE, type = \"rectangle\", size = NULL, data = NULL, no_axes = NULL, active = NULL )"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_dendro.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot dendrogram tree — align_dendro","text":"mapping Default list aesthetic mappings use plot. specified, must supplied layer added plot. ... Additional arguments passed geom_segment(). distance string distance measure used. must one \"euclidean\", \"maximum\", \"manhattan\", \"canberra\", \"binary\" \"minkowski\". Correlation coefficient can also used, including \"pearson\", \"spearman\" \"kendall\". way, 1 - cor used distance. addition, can also provide dist object directly function return dist object. Use NULL, want calculate distance. method string agglomeration method used. (unambiguous abbreviation ) one \"ward.D\", \"ward.D2\", \"single\", \"complete\", \"average\" (= UPGMA), \"mcquitty\" (= WPGMA), \"median\" (= WPGMC) \"centroid\" (= UPGMC). can also provide function accepts calculated distance (input matrix distance NULL) returns hclust object. Alternative, can supply object can coerced hclust. use_missing optional character string giving method computing covariances presence missing values. must (abbreviation ) one strings \"everything\", \".obs\", \"complete.obs\", \"na..complete\", \"pairwise.complete.obs\". used distance correlation coefficient string. reorder_dendrogram single boolean value indicating whether reorder dendrogram based means. Alternatively, can provide custom function accepts hclust object data used generate tree, returning either hclust dendrogram object. Default FALSE. merge_dendrogram single boolean value, indicates whether merge multiple dendrograms, used previous groups established. Default: FALSE. reorder_group single boolean value, indicates whether Hierarchical Clustering groups, used previous groups established. Default: FALSE. k integer scalar indicates desired number groups. h numeric scalar indicates heights tree cut. cutree function used cut hclust tree. accept four arguments: hclust tree object, distance (applicable method string function performing hierarchical clustering), k (number clusters), h (height cut tree). default, cutree() used. plot_dendrogram boolean value indicates whether plot dendrogram tree. plot_cut_height boolean value indicates whether plot cut height. root length one string numeric indicates root branch. center boolean value. TRUE, nodes plotted centered respect leaves branch. Otherwise (default), plot middle direct child nodes. type string indicates plot type, \"rectangle\" \"triangle\". size relative size plot, can specified unit(). Note circle_layout(), size values interpreted relative sizes, layout type adjusts based available space circular arrangement. data matrix-like object. default, inherits layout matrix. no_axes Logical; TRUE, removes axes elements alignment axis using theme_no_axes(). default, use option- \"ggalign.align_no_axes\". active active() object defines context settings added layout.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_dendro.html","id":"ggplot-specification","dir":"Reference","previous_headings":"","what":"ggplot2 specification","title":"Plot dendrogram tree — align_dendro","text":"align_dendro initializes ggplot data mapping. internal ggplot object always use default mapping aes(x = .data$x, y = .data$y). default ggplot data node coordinates edge data attached ggalign attribute, addition, geom_segment layer data frame edge coordinates added plot_dendrogram = TRUE. dendrogram node edge contains following columns: .panel: Tree branch groups, used create ggplot2 facet. Similar panel column, always give correct branch usage ggplot facet. .names .index: character names (applicable names exists) integer index original data. label: node label text x y: x-axis y-axis coordinates current node start node current edge. xend yend: x-axis y-axis coordinates terminal node current edge. branch: branch current node edge . can use column color different groups. leaf: logical value indicates whether current node leaf. panel: panel current node , split plot panel using facet_grid, column show panel current node edge . Note: nodes may fall outside panel (two panel), possible NA values column. panel1 panel2: panel1 panel2 variables functionality panel, specifically edge data correspond nodes edge.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_dendro.html","id":"discrete-axis-alignment","dir":"Reference","previous_headings":"","what":"Discrete Axis Alignment","title":"Plot dendrogram tree — align_dendro","text":"important note consider rows observations, meaning vec_size(data)/NROW(data) must match number observations along axis used alignment (x-axis vertical stack layout, y-axis horizontal stack layout).","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_dendro.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot dendrogram tree — align_dendro","text":"","code":"# align_dendro will always add a plot area ggheatmap(matrix(rnorm(81), nrow = 9)) + anno_top() + align_dendro() #> → heatmap built with `geom_tile()` ggheatmap(matrix(rnorm(81), nrow = 9)) + anno_top() + align_dendro(k = 3L) #> → heatmap built with `geom_tile()`"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_group.html","id":null,"dir":"Reference","previous_headings":"","what":"Group and align observations based on a group vector — align_group","title":"Group and align observations based on a group vector — align_group","text":"Splits observations groups, slice ordering based group levels.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_group.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Group and align observations based on a group vector — align_group","text":"","code":"align_group(group, active = NULL)"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_group.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Group and align observations based on a group vector — align_group","text":"group character define groups observations. active active() object defines context settings added layout.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_group.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Group and align observations based on a group vector — align_group","text":"","code":"set.seed(1L) small_mat <- matrix(rnorm(81), nrow = 9) ggheatmap(small_mat) + anno_top() + align_group(sample(letters[1:4], ncol(small_mat), replace = TRUE)) #> → heatmap built with `geom_tile()`"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_hclust.html","id":null,"dir":"Reference","previous_headings":"","what":"Reorder or Group observations based on hierarchical clustering — align_hclust","title":"Reorder or Group observations based on hierarchical clustering — align_hclust","text":"function aligns observations within layout according hierarchical clustering tree, enabling reordering grouping elements based clustering results.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_hclust.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reorder or Group observations based on hierarchical clustering — align_hclust","text":"","code":"align_hclust( distance = \"euclidean\", method = \"complete\", use_missing = \"pairwise.complete.obs\", reorder_dendrogram = FALSE, reorder_group = FALSE, k = NULL, h = NULL, cutree = NULL, data = NULL, active = NULL )"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_hclust.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reorder or Group observations based on hierarchical clustering — align_hclust","text":"distance string distance measure used. must one \"euclidean\", \"maximum\", \"manhattan\", \"canberra\", \"binary\" \"minkowski\". Correlation coefficient can also used, including \"pearson\", \"spearman\" \"kendall\". way, 1 - cor used distance. addition, can also provide dist object directly function return dist object. Use NULL, want calculate distance. method string agglomeration method used. (unambiguous abbreviation ) one \"ward.D\", \"ward.D2\", \"single\", \"complete\", \"average\" (= UPGMA), \"mcquitty\" (= WPGMA), \"median\" (= WPGMC) \"centroid\" (= UPGMC). can also provide function accepts calculated distance (input matrix distance NULL) returns hclust object. Alternative, can supply object can coerced hclust. use_missing optional character string giving method computing covariances presence missing values. must (abbreviation ) one strings \"everything\", \".obs\", \"complete.obs\", \"na..complete\", \"pairwise.complete.obs\". used distance correlation coefficient string. reorder_dendrogram single boolean value indicating whether reorder dendrogram based means. Alternatively, can provide custom function accepts hclust object data used generate tree, returning either hclust dendrogram object. Default FALSE. reorder_group single boolean value, indicates whether Hierarchical Clustering groups, used previous groups established. Default: FALSE. k integer scalar indicates desired number groups. h numeric scalar indicates heights tree cut. cutree function used cut hclust tree. accept four arguments: hclust tree object, distance (applicable method string function performing hierarchical clustering), k (number clusters), h (height cut tree). default, cutree() used. data matrix-like object. default, inherits layout matrix. active active() object defines context settings added layout.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_hclust.html","id":"discrete-axis-alignment","dir":"Reference","previous_headings":"","what":"Discrete Axis Alignment","title":"Reorder or Group observations based on hierarchical clustering — align_hclust","text":"important note consider rows observations, meaning vec_size(data)/NROW(data) must match number observations along axis used alignment (x-axis vertical stack layout, y-axis horizontal stack layout).","code":""},{"path":[]},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_hclust.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reorder or Group observations based on hierarchical clustering — align_hclust","text":"","code":"# align_hclust won't add a dendrogram ggheatmap(matrix(rnorm(81), nrow = 9)) + anno_top() + align_hclust(k = 3L) #> → heatmap built with `geom_tile()`"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_kmeans.html","id":null,"dir":"Reference","previous_headings":"","what":"Split observations by k-means clustering groups. — align_kmeans","title":"Split observations by k-means clustering groups. — align_kmeans","text":"Aligns groups observations based k-means clustering, enabling observation splits cluster groups.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_kmeans.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Split observations by k-means clustering groups. — align_kmeans","text":"","code":"align_kmeans(centers, ..., data = NULL, active = NULL)"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_kmeans.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Split observations by k-means clustering groups. — align_kmeans","text":"centers either number clusters, say \\(k\\), set initial (distinct) cluster centres. number, random set (distinct) rows x chosen initial centres. ... Arguments passed stats::kmeans iter.max maximum number iterations allowed. nstart centers number, many random sets chosen? algorithm character: may abbreviated. Note \"Lloyd\" \"Forgy\" alternative names one algorithm. trace logical integer number, currently used default method (\"Hartigan-Wong\"): positive (true), tracing information progress algorithm produced. Higher values may produce tracing information. data following options can used: NULL: data set. waiver(): Inherits data layout matrix. function (including purrr-like lambda syntax): Applied layout matrix transform data use. transform final plot data, please use scheme_data(). matrix, data.frame, atomic vector. active active() object defines context settings added layout.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_kmeans.html","id":"discrete-axis-alignment","dir":"Reference","previous_headings":"","what":"Discrete Axis Alignment","title":"Split observations by k-means clustering groups. — align_kmeans","text":"important note consider rows observations, meaning vec_size(data)/NROW(data) must match number observations along axis used alignment (x-axis vertical stack layout, y-axis horizontal stack layout).","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_kmeans.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Split observations by k-means clustering groups. — align_kmeans","text":"","code":"ggheatmap(matrix(rnorm(81), nrow = 9)) + anno_top() + align_kmeans(3L) #> → heatmap built with `geom_tile()`"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_order.html","id":null,"dir":"Reference","previous_headings":"","what":"Order observations based on weights — align_order","title":"Order observations based on weights — align_order","text":"Ordering observations based summary weights specified ordering character integer index.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_order.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Order observations based on weights — align_order","text":"","code":"align_order( weights = rowMeans, ..., reverse = FALSE, strict = TRUE, data = NULL, active = NULL )"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_order.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Order observations based on weights — align_order","text":"weights summary function accepts data returns weights observations. Alternatively, can provide ordering index either integer character. Since characters designated character indices, wish specify function name string, must enclose (). ... Additional arguments passed function provided weights argument. reverse boolean value. sort order reverse? strict boolean value indicates whether order strict. previous groups established, strict FALSE, reorder observations group. data matrix, data frame, atomic vector used input weights function. Alternatively, can specify function (including purrr-like lambda syntax) applied layout matrix, transforming necessary weight calculations. default, inherit layout matrix. active active() object defines context settings added layout.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_order.html","id":"discrete-axis-alignment","dir":"Reference","previous_headings":"","what":"Discrete Axis Alignment","title":"Order observations based on weights — align_order","text":"important note consider rows observations, meaning vec_size(data)/NROW(data) must match number observations along axis used alignment (x-axis vertical stack layout, y-axis horizontal stack layout).","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_order.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Order observations based on weights — align_order","text":"","code":"ggheatmap(matrix(rnorm(81), nrow = 9)) + anno_left() + align_order(I(\"rowMeans\")) #> → heatmap built with `geom_tile()`"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_panel.html","id":null,"dir":"Reference","previous_headings":"","what":"Create ggplot object with layout panel data — align_panel","title":"Create ggplot object with layout panel data — align_panel","text":"function deprecated realised special case ggalign() function. Please use ggalign(data = NULL) instead.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_panel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create ggplot object with layout panel data — align_panel","text":"","code":"align_panel(...) ggpanel(...)"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_plots.html","id":null,"dir":"Reference","previous_headings":"","what":"Arrange multiple plots into a grid — align_plots","title":"Arrange multiple plots into a grid — align_plots","text":"Arrange multiple plots grid","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_plots.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Arrange multiple plots into a grid — align_plots","text":"","code":"align_plots( ..., ncol = NULL, nrow = NULL, byrow = TRUE, widths = NA, heights = NA, design = NULL, guides = waiver(), theme = NULL )"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_plots.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Arrange multiple plots into a grid — align_plots","text":"... list plots, ususally ggplot object. Use NULL indicate empty spacer. ncol, nrow dimensions grid create - NULL use logic facet_wrap() set dimensions byrow FALSE plots filled column-major order. widths, heights relative widths heights column row grid. get repeated match dimensions grid. special value NA behave 1null unit unless fixed aspect plot inserted case allow dimension expand contract match aspect ratio content. design Specification location areas layout. Can either specified text string concatenating calls area() together. guides string one \"t\", \"l\", \"b\", \"r\" indicating side guide legends collected. Defaults waiver(), inherits parent layout. parent layout, NULL provided, guides collected. theme theme() object used customize various elements plot, including guides, title, subtitle, caption, margins, panel.border, background. default, theme inherit parent layout.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_plots.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Arrange multiple plots into a grid — align_plots","text":"alignpatches object.","code":""},{"path":[]},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_plots.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Arrange multiple plots into a grid — align_plots","text":"","code":"# directly copied from patchwork p1 <- ggplot(mtcars) + geom_point(aes(mpg, disp)) p2 <- ggplot(mtcars) + geom_boxplot(aes(gear, disp, group = gear)) p3 <- ggplot(mtcars) + geom_bar(aes(gear)) + facet_wrap(~cyl) p4 <- ggplot(mtcars) + geom_bar(aes(carb)) p5 <- ggplot(mtcars) + geom_violin(aes(cyl, mpg, group = cyl)) # Either add the plots as single arguments align_plots(p1, p2, p3, p4, p5) # Or use bang-bang-bang to add a list align_plots(!!!list(p1, p2, p3), p4, p5) # Match plots to areas by name design <- \"#BB AA#\" align_plots(B = p1, A = p2, design = design) # Compare to not using named plot arguments align_plots(p1, p2, design = design)"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_reorder.html","id":null,"dir":"Reference","previous_headings":"","what":"Reorders layout observations based on specific statistics. — align_reorder","title":"Reorders layout observations based on specific statistics. — align_reorder","text":"Reorders layout observations based specific statistics.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_reorder.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reorders layout observations based on specific statistics. — align_reorder","text":"","code":"align_reorder( stat, ..., reverse = FALSE, strict = TRUE, data = NULL, active = NULL )"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_reorder.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reorders layout observations based on specific statistics. — align_reorder","text":"stat statistical function accepts data returns statistic, call order2() extract ordering information. ... Additional arguments passed function provided stat argument. reverse boolean value. sort order reverse? strict boolean value indicates whether order strict. previous groups established, strict FALSE, reorder observations group. data matrix, data frame, atomic vector used input stat function. Alternatively, can specify function (including purrr-like lambda syntax) applied layout matrix, transforming necessary statistic calculations. default, inherit layout matrix. active active() object defines context settings added layout.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_reorder.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Reorders layout observations based on specific statistics. — align_reorder","text":"align_reorder() function differs align_order() weights argument align_order() must return atomic weights observation. contrast, stat argument align_reorder() can return complex structures, hclust dendrogram, among others. Typically, can achieve functionality align_reorder() using align_order() manually extracting ordering information statistic.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_reorder.html","id":"discrete-axis-alignment","dir":"Reference","previous_headings":"","what":"Discrete Axis Alignment","title":"Reorders layout observations based on specific statistics. — align_reorder","text":"important note consider rows observations, meaning vec_size(data)/NROW(data) must match number observations along axis used alignment (x-axis vertical stack layout, y-axis horizontal stack layout).","code":""},{"path":[]},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/align_reorder.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reorders layout observations based on specific statistics. — align_reorder","text":"","code":"ggheatmap(matrix(rnorm(81), nrow = 9)) + anno_left() + align_reorder(hclust2) #> → heatmap built with `geom_tile()`"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/alignpatch.html","id":null,"dir":"Reference","previous_headings":"","what":"Prepare plots to be aligned with align_plots — alignpatch","title":"Prepare plots to be aligned with align_plots — alignpatch","text":"Prepare plots aligned align_plots","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/alignpatch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prepare plots to be aligned with align_plots — alignpatch","text":"","code":"alignpatch(x)"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/alignpatch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prepare plots to be aligned with align_plots — alignpatch","text":"x plot object prepared alignment.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/alignpatch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prepare plots to be aligned with align_plots — alignpatch","text":"Patch object.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/alignpatch.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Prepare plots to be aligned with align_plots — alignpatch","text":"ggalign implement alignpatch method following objects: ggplot alignpatches wrapped_plot patch wrapped_patch spacer","code":""},{"path":[]},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/alignpatch.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Prepare plots to be aligned with align_plots — alignpatch","text":"","code":"alignpatch(ggplot()) #> #> add_background: function #> add_plot: function #> align_border: function #> align_free_border: function #> align_panel_sizes: function #> collect_guides: function #> free_border: function #> free_lab: function #> get_sizes: function #> patch_gtable: function #> plot: gg, ggplot #> respect: function #> set_guides: function #> set_theme: function #> split_gt: function #> super: "},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/area.html","id":null,"dir":"Reference","previous_headings":"","what":"Define the plotting areas in align_plots — area","title":"Define the plotting areas in align_plots — area","text":"small helper used specify single area rectangular grid contain plot. Objects constructed area() can concatenated together c() order specify multiple areas.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/area.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Define the plotting areas in align_plots — area","text":"","code":"area(t, l, b = t, r = l)"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/area.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Define the plotting areas in align_plots — area","text":"t, b top bottom bounds area grid l, r left right bounds area int grid","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/area.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Define the plotting areas in align_plots — area","text":"ggalign_area object.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/area.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Define the plotting areas in align_plots — area","text":"grid areas specified reference enumerate rows top bottom, coloumns left right. means t l always less equal b r respectively. Instead specifying area placement combination area() calls, possible instead pass single string equivalent ","code":"areas <- c(area(1, 1, 2, 1), area(2, 3, 3, 3)) areas < -\"A## A#B ##B\""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/area.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Define the plotting areas in align_plots — area","text":"","code":"p1 <- ggplot(mtcars) + geom_point(aes(mpg, disp)) p2 <- ggplot(mtcars) + geom_boxplot(aes(gear, disp, group = gear)) p3 <- ggplot(mtcars) + geom_bar(aes(gear)) + facet_wrap(~cyl) layout <- c( area(1, 1), area(1, 3, 3), area(3, 1, 3, 2) ) #> Error in vec_slice(vec_data(x), i): Can't use character names to index an unnamed vector. # Show the layout to make sure it looks as it should plot(layout) #> Error in curve(expr = x, from = from, to = to, xlim = xlim, ylab = ylab, ...): 'expr' did not evaluate to an object of length 'n' # Apply it to a alignpatches align_plots(p1, p2, p3, design = layout) #> Error in as_areas(design): Cannot convert a function into a design area"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/cash-LayoutProto-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset a Layout object — $,LayoutProto-method","title":"Subset a Layout object — $,LayoutProto-method","text":"Used ggplot_build ggsave","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/cash-LayoutProto-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset a Layout object — $,LayoutProto-method","text":"","code":"# S4 method for class 'LayoutProto' x$name"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/cash-LayoutProto-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset a Layout object — $,LayoutProto-method","text":"x Layout object name string slot name Layout object.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/cash-LayoutProto-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset a Layout object — $,LayoutProto-method","text":"slot value.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/circle_continuous.html","id":null,"dir":"Reference","previous_headings":"","what":"Arrange Plots in a Circular Layout — circle_continuous","title":"Arrange Plots in a Circular Layout — circle_continuous","text":"circle_continuous function arranges plots aligning continuous variables circular layout.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/circle_continuous.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Arrange Plots in a Circular Layout — circle_continuous","text":"","code":"circle_continuous(data = NULL, ..., radial = NULL, limits = NULL, theme = NULL)"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/circle_continuous.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Arrange Plots in a Circular Layout — circle_continuous","text":"data Default dataset use layout. specified, must supplied plot added layout, fortify_matrix() used convert data matrix. ... Additional arguments passed fortify_matrix(). radial coord_radial() object defines global parameters coord_radial across plots layout. parameters start, end, direction, expand inherited applied uniformly plots within layout. parameters theta r.axis.inside always ignored set \"x\" TRUE, respectively, plots. limits continuous_limits() object specifying left/lower limit right/upper limit scale. Used align continuous axis. theme theme() object used customize various elements layout, including guides, title, subtitle, caption, margins, panel.border, background. default, theme inherit parent layout. also controls panel spacing plots layout.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/circle_continuous.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Arrange Plots in a Circular Layout — circle_continuous","text":"","code":"circle_continuous(mpg, limits = continuous_limits(c(3, 5))) + ggalign(mapping = aes(displ, hwy, colour = class)) + geom_point(size = 2) + ggalign(mapping = aes(displ, hwy, colour = class)) + geom_point(size = 2) & scale_color_brewer(palette = \"Dark2\") & theme_bw()"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/circle_discrete.html","id":null,"dir":"Reference","previous_headings":"","what":"Arrange Plots in a Circular Layout — circle_discrete","title":"Arrange Plots in a Circular Layout — circle_discrete","text":"circle_discrete function arranges plots aligning discrete variables circular layout.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/circle_discrete.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Arrange Plots in a Circular Layout — circle_discrete","text":"","code":"circle_discrete(data = NULL, ..., radial = NULL, theme = NULL)"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/circle_discrete.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Arrange Plots in a Circular Layout — circle_discrete","text":"data Default dataset use layout. specified, must supplied plot added layout, fortify_matrix() used convert data matrix. ... Additional arguments passed fortify_matrix(). radial coord_radial() object defines global parameters coord_radial across plots layout. parameters start, end, direction, expand inherited applied uniformly plots within layout. parameters theta r.axis.inside always ignored set \"x\" TRUE, respectively, plots. theme theme() object used customize various elements layout, including guides, title, subtitle, caption, margins, panel.border, background. default, theme inherit parent layout. also controls panel spacing plots layout.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/circle_discrete.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Arrange Plots in a Circular Layout — circle_discrete","text":"","code":"set.seed(123) circle_discrete(matrix(rnorm(56), nrow = 7L), radial = coord_radial(inner.radius = 0.1) ) + ggalign() + geom_tile(aes(y = .column_index, fill = value)) + scale_fill_viridis_c() + align_dendro(aes(color = branch), k = 3L) + scale_color_brewer(palette = \"Dark2\") #> Error in switch(params$position, theta.sec = -Inf, top = -Inf, right = -Inf, Inf): EXPR must be a length 1 vector"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/circle_layout.html","id":null,"dir":"Reference","previous_headings":"","what":"Arrange Plots in a Circular Layout — circle_layout","title":"Arrange Plots in a Circular Layout — circle_layout","text":"function integrates functionalities circle_discrete() circle_continuous() single interface.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/circle_layout.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Arrange Plots in a Circular Layout — circle_layout","text":"","code":"circle_layout(data = NULL, ..., limits = waiver())"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/circle_layout.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Arrange Plots in a Circular Layout — circle_layout","text":"data Default dataset use layout. specified, must supplied plot added layout: limits provided, fortify_matrix() used get matrix. limits specified, fortify_data_frame() used get data frame. Note data matrix, automatically converted long-formatted data frame, differs ggplot2's behavior. ... Additional arguments passed fortify_data_frame(). limits continuous_limits() object specifying left/lower limit right/upper limit scale. Used align continuous axis.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/circle_layout.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Arrange Plots in a Circular Layout — circle_layout","text":"CircleLayout object.","code":""},{"path":[]},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/circle_layout.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Arrange Plots in a Circular Layout — circle_layout","text":"","code":"set.seed(123) small_mat <- matrix(rnorm(56), nrow = 7L) # circle_discrete circle_layout(matrix(rnorm(56), nrow = 7L)) + ggalign() + geom_tile(aes(y = .column_index, fill = value)) + scale_fill_viridis_c() + align_dendro(aes(color = branch), k = 3) + circle_switch(coord_radial(inner.radius = 0.5)) #> Error in switch(params$position, theta.sec = -Inf, top = -Inf, right = -Inf, Inf): EXPR must be a length 1 vector # circle_continuous circle_layout(mpg, limits = continuous_limits(c(3, 5))) + ggalign(mapping = aes(displ, hwy, colour = class)) + geom_point(size = 2) + ggalign(mapping = aes(displ, hwy, colour = class)) + geom_point(size = 2) & scale_color_brewer(palette = \"Dark2\") & theme_bw()"},{"path":[]},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/circle_switch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Determine the active context of circle layout — circle_switch","text":"","code":"circle_switch(radial = waiver(), what = waiver(), ...)"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/circle_switch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Determine the active context of circle layout — circle_switch","text":"radial coord_radial() object defines global parameters coord_radial across plots layout. parameters start, end, direction, expand inherited applied uniformly plots within layout. parameters theta r.axis.inside always ignored set \"x\" TRUE, respectively, plots. get activated circle_layout()? single number string plot elements layout. NULL, remove active context. ... dots future extensions must empty.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/circle_switch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Determine the active context of circle layout — circle_switch","text":"circle_switch object can added circle_layout().","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/circle_switch.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Determine the active context of circle layout — circle_switch","text":"","code":"circle_discrete(matrix(rnorm(56), nrow = 7L)) + ggalign() + geom_tile(aes(y = .column_index, fill = value)) + scale_fill_viridis_c() + align_dendro(aes(color = branch), k = 3) + circle_switch(coord_radial(inner.radius = 0.5, expand = FALSE)) #> Error in switch(params$position, theta.sec = -Inf, top = -Inf, right = -Inf, Inf): EXPR must be a length 1 vector"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/continuous_limits.html","id":null,"dir":"Reference","previous_headings":"","what":"Set continuous limits for the layout — continuous_limits","title":"Set continuous limits for the layout — continuous_limits","text":"align continuous axes, important keep limits consistent across plots layout. can set limits passing function directly limits xlim/ylim argument, using ... . Alternatively, can add continuous_limits() object layout. quad_layout() function, must specify x/y arguments. layouts, pass limits using ... directly.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/continuous_limits.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set continuous limits for the layout — continuous_limits","text":"","code":"continuous_limits(..., x = waiver(), y = waiver())"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/continuous_limits.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set continuous limits for the layout — continuous_limits","text":"... list two numeric values, specifying left/lower limit right/upper limit scale. x, y ..., specifically quad_layout().","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/cross_link.html","id":null,"dir":"Reference","previous_headings":"","what":"Add a plot to connect selected observations — cross_link","title":"Add a plot to connect selected observations — cross_link","text":"Add plot connect selected observations","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/cross_link.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add a plot to connect selected observations — cross_link","text":"","code":"cross_link( link, data = waiver(), on_top = TRUE, reorder = NULL, obs_size = 1, inherit_index = NULL, inherit_panel = NULL, inherit_nobs = NULL, size = NULL, active = NULL )"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/cross_link.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add a plot to connect selected observations — cross_link","text":"link link_draw() object defines draw links, link_line(). data dataset use layout. default, fortify_matrix() convert data matrix. argument allows change layout data. specified, original data used. on_top boolean value indicating whether draw link top plot panel (TRUE) (FALSE). reorder string \"hand1\" \"hand2\" indicating whether reorder input links follow specified layout ordering. obs_size single numeric value indicates size single observation, ranging (0, 1]. inherit_index boolean value indicating whether inherit ordering index. TRUE, match layout ordering index data names. inherit_panel boolean value indicating whether inherit panel group. TRUE, match layout panel data names. inherit_nobs boolean value indicating whether inherit number observations (nobs). TRUE, data input must compatible layout data. size relative size plot, can specified unit(). Note circle_layout(), size values interpreted relative sizes, layout type adjusts based available space circular arrangement. active active() object defines context settings added layout.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/cross_link.html","id":"ggplot-specification","dir":"Reference","previous_headings":"","what":"ggplot2 Specification","title":"Add a plot to connect selected observations — cross_link","text":"cross_link function initializes ggplot object initialize data. Using scheme_data() change internal data needed.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/cross_mark.html","id":null,"dir":"Reference","previous_headings":"","what":"Add a plot to annotate observations — cross_mark","title":"Add a plot to annotate observations — cross_mark","text":"Add plot annotate observations","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/cross_mark.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add a plot to annotate observations — cross_mark","text":"","code":"cross_mark( mark, data = waiver(), reorder = NULL, obs_size = 1, inherit_index = NULL, inherit_panel = NULL, inherit_nobs = NULL, size = NULL, active = NULL )"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/cross_mark.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add a plot to annotate observations — cross_mark","text":"mark mark_draw() object define draw links. Like mark_line(), mark_tetragon(). Note names pair links used define panel names must unique. data dataset use layout. default, fortify_matrix() convert data matrix. argument allows change layout data. specified, original data used. reorder string \"hand1\" \"hand2\" indicating whether reorder input links follow specified layout ordering. obs_size single numeric value indicates size single observation, ranging (0, 1]. inherit_index boolean value indicating whether inherit ordering index. TRUE, match layout ordering index data names. inherit_panel boolean value indicating whether inherit panel group. TRUE, match layout panel data names. inherit_nobs boolean value indicating whether inherit number observations (nobs). TRUE, data input must compatible layout data. size relative size plot, can specified unit(). Note circle_layout(), size values interpreted relative sizes, layout type adjusts based available space circular arrangement. active active() object defines context settings added layout.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/cross_mark.html","id":"ggplot-specification","dir":"Reference","previous_headings":"","what":"ggplot2 Specification","title":"Add a plot to annotate observations — cross_mark","text":"cross_mark function initializes ggplot object. underlying data contains following columns: .panel: panel aligned axis. means x-axis vertical stack layout (including top bottom annotation), y-axis horizontal stack layout (including left right annotation). .names (vec_names()) .index (vec_size()/NROW()): character names (applicable names exists) integer index original data. .hand: factor levels c(\"left\", \"right\") horizontal stack layouts, c(\"top\", \"bottom\") vertical stack layouts, indicating position linked observations. can use scheme_data() modify internal data needed.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/cross_none.html","id":null,"dir":"Reference","previous_headings":"","what":"Reset layout ordering and panel group — cross_none","title":"Reset layout ordering and panel group — cross_none","text":"Reset layout ordering panel group","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/cross_none.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reset layout ordering and panel group — cross_none","text":"","code":"cross_none( data = waiver(), inherit_index = NULL, inherit_panel = NULL, inherit_nobs = NULL )"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/cross_none.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reset layout ordering and panel group — cross_none","text":"data dataset use layout. default, fortify_matrix() convert data matrix. argument allows change layout data. specified, original data used. inherit_index boolean value indicating whether inherit ordering index. TRUE, match layout ordering index data names. inherit_panel boolean value indicating whether inherit panel group. TRUE, match layout panel data names. inherit_nobs boolean value indicating whether inherit number observations (nobs). TRUE, data input must compatible layout data.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/dendrogram_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Dengrogram x and y coordinates — dendrogram_data","title":"Dengrogram x and y coordinates — dendrogram_data","text":"Dengrogram x y coordinates","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/dendrogram_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Dengrogram x and y coordinates — dendrogram_data","text":"","code":"dendrogram_data( tree, priority = \"right\", center = FALSE, type = \"rectangle\", leaf_pos = NULL, leaf_braches = NULL, reorder_branches = TRUE, branch_gap = NULL, root = NULL, double = TRUE )"},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/dendrogram_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Dengrogram x and y coordinates — dendrogram_data","text":"tree hclust dendrogram object. priority string \"left\" \"right\". draw right left, left override right, take \"left\" priority. draw left right, right override left, take \"right\" priority. used align_dendro() provide support facet operation ggplot2. center boolean value. TRUE, nodes plotted centered respect leaves branch. Otherwise (default), plot middle direct child nodes. type string indicates plot type, \"rectangle\" \"triangle\". leaf_pos x-coordinates leaf node. Must length number observations tree. leaf_braches Branches leaf node. Must length number observations tree. Usually come cutree. reorder_branches single boolean value, indicates whether reorder provided leaf_braches based actual index. branch_gap single numeric value indicates gap different branches. root length one string numeric indicates root branch. double single logical value indicating whether horizontal lines doubled segments span multiple branches. TRUE, horizontal lines repeated branch segment spans. FALSE, one horizontal line drawn.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/dendrogram_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Dengrogram x and y coordinates — dendrogram_data","text":"list 2 data.frame. One node coordinates, another edge coordinates. node tree segments edge coordinates contains following columns: index: original index tree current node label: node label text x y: x-axis y-axis coordinates current node start node current edge. xend yend: x-axis y-axis coordinates terminal node current edge. branch: branch current node edge . can use column color different groups. panel: panel current node , split plot panel using facet_grid, column show panel current node edge . Note: nodes may fall outside panel (two panels), possible NA values column. ggpanel: Similar panel column, always give correct branch usage ggplot facet. panel1 panel2: panel1 panel2 variables functionality panel, specifically edge data correspond nodes edge. leaf: logical value indicates whether current node leaf.","code":""},{"path":"https://yunuuuu.github.io/ggalign/dev/reference/dendrogram_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Dengrogram x and y coordinates — dendrogram_data","text":"","code":"dendrogram_data(hclust(dist(USArrests), \"ave\")) #> $node #> index label x y branch leaf panel ggpanel #> 1 9 Florida 1.000000 0.000000 root TRUE #> 2 33 North Carolina 2.000000 0.000000 root TRUE #> 3 NA 1.500000 38.527912 root FALSE #> 4 5 California 3.000000 0.000000 root TRUE #> 5 20 Maryland 4.000000 0.000000 root TRUE #> 6 3 Arizona 5.000000 0.000000 root TRUE #> 7 31 New Mexico 6.000000 0.000000 root TRUE #> 8 NA 5.500000 13.896043 root FALSE #> 9 NA 4.750000 15.453120 root FALSE #> 10 NA 3.875000 28.012211 root FALSE #> 11 8 Delaware 7.000000 0.000000 root TRUE #> 12 1 Alabama 8.000000 0.000000 root TRUE #> 13 18 Louisiana 9.000000 0.000000 root TRUE #> 14 NA 8.500000 15.454449 root FALSE #> 15 NA 7.750000 16.891499 root FALSE #> 16 13 Illinois 10.000000 0.000000 root TRUE #> 17 32 New York 11.000000 0.000000 root TRUE #> 18 NA 10.500000 6.236986 root FALSE #> 19 22 Michigan 12.000000 0.000000 root TRUE #> 20 28 Nevada 13.000000 0.000000 root TRUE #> 21 NA 12.500000 13.297368 root FALSE #> 22 NA 11.500000 18.417331 root FALSE #> 23 NA 9.625000 26.363428 root FALSE #> 24 2 Alaska 14.000000 0.000000 root TRUE #> 25 24 Mississippi 15.000000 0.000000 root TRUE #> 26 40 South Carolina 16.000000 0.000000 root TRUE #> 27 NA 15.500000 21.167192 root FALSE #> 28 NA 14.750000 28.095803 root FALSE #> 29 NA 12.187500 39.394633 root FALSE #> 30 NA 8.031250 44.283922 root FALSE #> 31 NA 4.765625 77.605024 root FALSE #> 32 47 Washington 17.000000 0.000000 root TRUE #> 33 37 Oregon 18.000000 0.000000 root TRUE #> 34 50 Wyoming 19.000000 0.000000 root TRUE #> 35 36 Oklahoma 20.000000 0.000000 root TRUE #> 36 46 Virginia 21.000000 0.000000 root TRUE #> 37 NA 20.500000 7.355270 root FALSE #> 38 NA 19.750000 10.736739 root FALSE #> 39 NA 18.875000 12.878100 root FALSE #> 40 NA 17.937500 16.425489 root FALSE #> 41 39 Rhode Island 22.000000 0.000000 root TRUE #> 42 21 Massachusetts 23.000000 0.000000 root TRUE #> 43 30 New Jersey 24.000000 0.000000 root TRUE #> 44 NA 23.500000 11.456439 root FALSE #> 45 NA 22.750000 22.595978 root FALSE #> 46 NA 20.343750 26.713777 root FALSE #> 47 25 Missouri 25.000000 0.000000 root TRUE #> 48 4 Arkansas 26.000000 0.000000 root TRUE #> 49 42 Tennessee 27.000000 0.000000 root TRUE #> 50 NA 26.500000 12.614278 root FALSE #> 51 NA 25.750000 20.198479 root FALSE #> 52 10 Georgia 28.000000 0.000000 root TRUE #> 53 6 Colorado 29.000000 0.000000 root TRUE #> 54 43 Texas 30.000000 0.000000 root TRUE #> 55 NA 29.500000 14.501034 root FALSE #> 56 NA 28.750000 23.972143 root FALSE #> 57 NA 27.250000 29.054195 root FALSE #> 58 NA 23.796875 44.837933 root FALSE #> 59 12 Idaho 31.000000 0.000000 root TRUE #> 60 27 Nebraska 32.000000 0.000000 root TRUE #> 61 17 Kentucky 33.000000 0.000000 root TRUE #> 62 26 Montana 34.000000 0.000000 root TRUE #> 63 NA 33.500000 3.834058 root FALSE #> 64 NA 32.750000 12.438692 root FALSE #> 65 NA 31.875000 15.026107 root FALSE #> 66 35 Ohio 35.000000 0.000000 root TRUE #> 67 44 Utah 36.000000 0.000000 root TRUE #> 68 NA 35.500000 6.637771 root FALSE #> 69 14 Indiana 37.000000 0.000000 root TRUE #> 70 16 Kansas 38.000000 0.000000 root TRUE #> 71 NA 37.500000 3.929377 root FALSE #> 72 7 Connecticut 39.000000 0.000000 root TRUE #> 73 38 Pennsylvania 40.000000 0.000000 root TRUE #> 74 NA 39.500000 8.027453 root FALSE #> 75 NA 38.500000 13.352260 root FALSE #> 76 NA 37.000000 15.122897 root FALSE #> 77 NA 34.437500 20.598507 root FALSE #> 78 11 Hawaii 41.000000 0.000000 root TRUE #> 79 48 West Virginia 42.000000 0.000000 root TRUE #> 80 19 Maine 43.000000 0.000000 root TRUE #> 81 41 South Dakota 44.000000 0.000000 root TRUE #> 82 NA 43.500000 8.537564 root FALSE #> 83 NA 42.750000 10.771175 root FALSE #> 84 34 North Dakota 45.000000 0.000000 root TRUE #> 85 45 Vermont 46.000000 0.000000 root TRUE #> 86 NA 45.500000 13.044922 root FALSE #> 87 23 Minnesota 47.000000 0.000000 root TRUE #> 88 49 Wisconsin 48.000000 0.000000 root TRUE #> 89 15 Iowa 49.000000 0.000000 root TRUE #> 90 29 New Hampshire 50.000000 0.000000 root TRUE #> 91 NA 49.500000 2.291288 root FALSE #> 92 NA 48.750000 10.184218 root FALSE #> 93 NA 47.875000 18.993398 root FALSE #> 94 NA 46.687500 27.779904 root FALSE #> 95 NA 44.718750 33.117815 root FALSE