{"id":326839,"date":"2022-01-10T08:39:27","date_gmt":"2022-01-10T08:39:27","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=326839"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=326839","title":{"rendered":"<span>\u0418\u0437\u043e\u0431\u0440\u0435\u0442\u0435\u043c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 \u0441\u043d\u043e\u0432\u0430 \u0438\u043b\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\" class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u043e \u043f\u0430\u043a\u0435\u0442 ComplexUpset \u0432 R<\/p>\n<h2>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u043c<\/h2>\n<p>\u041f\u043e \u043f\u0430\u043a\u0435\u0442\u0443 ggplot2 \u0434\u043b\u044f R \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u043a\u043d\u0438\u0433, \u0441\u0442\u0430\u0442\u0435\u0439 &#8212; \u043e\u043d \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0440\u043e\u0448, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u0445, \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u0435\u043d\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0438 \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u0438\u0437\u043e\u0431\u0440\u0435\u0441\u0442\u0438 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 \u0437\u0430\u043d\u043e\u0432\u043e. \u041d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0447\u0442\u043e-\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435, \u043d\u043e \u0443\u0437\u043a\u043e\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 &#8212; \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u044d\u0442\u043e\u0433\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0430\u043a\u0435\u0442 ComplexUpset.<\/p>\n<p>ComplexUpset \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0438 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e. <\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 &#8212; CollegeDistance \u0438\u0437 \u043f\u0430\u043a\u0435\u0442\u0430 AER. \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0435\u0435<\/p>\n<pre><code class=\"r\">library(ComplexUpset) library(AER) library(tidyverse) data(\"CollegeDistance\") glimpse(CollegeDistance) CollegeDistance &lt;- as.data.frame(CollegeDistance) tab_2 &lt;- colnames(CollegeDistance[,c(4:7)]) CollegeDistance[,c(4:7)] &lt;- CollegeDistance[,c(4:7)] == \"yes\" head(CollegeDistance)<\/code><\/pre>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" height=\"123\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/17b\/233\/e45\/17b233e45fa8ff7c040f4754f9c33929.png\" data-width=\"867\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c 4 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435: fcollege \u0438 mcollege \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442, \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438 \u043b\u0438 \u043c\u0430\u0442\u044c\/\u043e\u0442\u0435\u0446 \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u0430 \u043a\u043e\u043b\u043b\u0435\u0434\u0436, home &#8212; \u0436\u0438\u0432\u0435\u0442 \u043b\u0438 \u0441\u0435\u043c\u044c\u044f \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u0430 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u0434\u043e\u043c\u0435, urban &#8212; \u0436\u0438\u0432\u0435\u0442 \u043b\u0438 \u0441\u0435\u043c\u044c\u044f \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u0430 \u0432 \u0433\u043e\u0440\u043e\u0434\u0435.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e upset (\u043f\u0435\u0440\u0432\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f &#8212; \u0438\u043c\u044f \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c\u0430, \u0432\u0442\u043e\u0440\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f &#8212; \u0432\u0435\u043a\u0442\u043e\u0440 \u0438\u043c\u0435\u043d \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445)<\/p>\n<pre><code class=\"r\">upset(CollegeDistance, tab_2)<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/c80\/c9e\/dfb\/c80c9edfb2530da001b3f3ac233ed023.jpg\" width=\"1188\" height=\"665\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c80\/c9e\/dfb\/c80c9edfb2530da001b3f3ac233ed023.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041b\u0435\u0432\u0430\u044f \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0430 &#8212; \u044d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0441\u043f\u043e\u043d\u0434\u0435\u043d\u0442\u043e\u0432, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u0437\u043d\u0430\u043a.<\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0432\u043d\u0438\u0437\u0443 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432. \u0422\u0430\u043a, \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0436\u0438\u0432\u0443\u0442 \u0432 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u0434\u043e\u043c\u0435, \u043d\u043e \u043d\u0435 \u0432 \u0433\u043e\u0440\u043e\u0434\u0435, \u043f\u0440\u0438\u0447\u0435\u043c \u043c\u0430\u0442\u044c \u0438 \u043e\u0442\u0435\u0446 \u043d\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u043b\u0438 \u043a\u043e\u043b\u043b\u0435\u0434\u0436 &#8212; 2188. \u041b\u044e\u0434\u0435\u0439 \u0441 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c &#8212; 9.<\/p>\n<p>\u0421\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 &#8212; \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0435\u0449\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0438<\/p>\n<pre><code class=\"r\">upset(CollegeDistance, tab_2, annotations = list('Distribution of Score'=(   ggplot(mapping=aes(y=score))   + geom_violin(alpha=0.5, na.rm=TRUE))))<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/a25\/529\/2a8\/a255292a8f600637b994b331d009181e.jpg\" width=\"1188\" height=\"665\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a25\/529\/2a8\/a255292a8f600637b994b331d009181e.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 ggplot2, \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a \u0441\u043a\u0440\u0438\u043f\u0438\u0447\u043d\u044b\u0435 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f &#171;score&#187; \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b.<\/p>\n<p>\u0415\u0449\u0435 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0439 \u0431\u043e\u043d\u0443\u0441 &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442 \u043d\u0435\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0442\u0435\u0441\u0442 \u041a\u0440\u0443\u0441\u043a\u0430\u043b\u0430-\u0423\u043e\u043b\u043b\u0438\u0441\u0430 \u043d\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u043c\u0435\u0434\u0438\u0430\u043d \u043f\u043e \u0432\u0441\u0435\u043c \u043f\u043e\u0434\u0432\u044b\u0431\u043e\u0440\u043a\u0430\u043c, \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0435\u0439 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445.<\/p>\n<pre><code class=\"r\">upset_test(CollegeDistance, tab_2)<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/e83\/ad8\/f83\/e83ad8f838e61a77d445bfbda31c84f9.jpg\" width=\"863\" height=\"194\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e83\/ad8\/f83\/e83ad8f838e61a77d445bfbda31c84f9.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0438\u0437 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f &#171;\u0437\u0430\u0440\u0430\u0431\u043e\u0442\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0430&#187;, \u0430 \u0432\u044b\u0448\u0435 \u0432\u0441\u0435\u0433\u043e &#8212; \u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f &#171;\u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435&#187;.<\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0443 \u043f\u0430\u043a\u0435\u0442\u0430 \u0435\u0441\u0442\u044c \u0448\u0438\u043a\u0430\u0440\u043d\u0430\u044f \u0432\u0438\u043d\u044c\u0435\u0442\u043a\u0430 (<a href=\"https:\/\/cran.r-project.org\/web\/packages\/ComplexUpset\/vignettes\/Examples_R.html\" rel=\"noopener noreferrer nofollow\">https:\/\/cran.r-project.org\/web\/packages\/ComplexUpset\/vignettes\/Examples_R.html<\/a>), \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430.<\/p>\n<\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/599693\/\"> https:\/\/habr.com\/ru\/post\/599693\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\" class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u043e \u043f\u0430\u043a\u0435\u0442 ComplexUpset \u0432 R<\/p>\n<h2>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u043c<\/h2>\n<p>\u041f\u043e \u043f\u0430\u043a\u0435\u0442\u0443 ggplot2 \u0434\u043b\u044f R \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u043a\u043d\u0438\u0433, \u0441\u0442\u0430\u0442\u0435\u0439 &#8212; \u043e\u043d \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0440\u043e\u0448, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u0445, \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u0435\u043d\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0438 \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u0438\u0437\u043e\u0431\u0440\u0435\u0441\u0442\u0438 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 \u0437\u0430\u043d\u043e\u0432\u043e. \u041d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0447\u0442\u043e-\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435, \u043d\u043e \u0443\u0437\u043a\u043e\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 &#8212; \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u044d\u0442\u043e\u0433\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0430\u043a\u0435\u0442 ComplexUpset.<\/p>\n<p>ComplexUpset \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0438 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e. <\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 &#8212; CollegeDistance \u0438\u0437 \u043f\u0430\u043a\u0435\u0442\u0430 AER. \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0435\u0435<\/p>\n<pre><code class=\"r\">library(ComplexUpset) library(AER) library(tidyverse) data(\"CollegeDistance\") glimpse(CollegeDistance) CollegeDistance &lt;- as.data.frame(CollegeDistance) tab_2 &lt;- colnames(CollegeDistance[,c(4:7)]) CollegeDistance[,c(4:7)] &lt;- CollegeDistance[,c(4:7)] == \"yes\" head(CollegeDistance)<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c 4 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435: fcollege \u0438 mcollege \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442, \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438 \u043b\u0438 \u043c\u0430\u0442\u044c\/\u043e\u0442\u0435\u0446 \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u0430 \u043a\u043e\u043b\u043b\u0435\u0434\u0436, home &#8212; \u0436\u0438\u0432\u0435\u0442 \u043b\u0438 \u0441\u0435\u043c\u044c\u044f \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u0430 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u0434\u043e\u043c\u0435, urban &#8212; \u0436\u0438\u0432\u0435\u0442 \u043b\u0438 \u0441\u0435\u043c\u044c\u044f \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u0430 \u0432 \u0433\u043e\u0440\u043e\u0434\u0435.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e upset (\u043f\u0435\u0440\u0432\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f &#8212; \u0438\u043c\u044f \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c\u0430, \u0432\u0442\u043e\u0440\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f &#8212; \u0432\u0435\u043a\u0442\u043e\u0440 \u0438\u043c\u0435\u043d \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445)<\/p>\n<pre><code class=\"r\">upset(CollegeDistance, tab_2)<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041b\u0435\u0432\u0430\u044f \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0430 &#8212; \u044d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0441\u043f\u043e\u043d\u0434\u0435\u043d\u0442\u043e\u0432, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u0437\u043d\u0430\u043a.<\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0432\u043d\u0438\u0437\u0443 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432. \u0422\u0430\u043a, \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0436\u0438\u0432\u0443\u0442 \u0432 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u0434\u043e\u043c\u0435, \u043d\u043e \u043d\u0435 \u0432 \u0433\u043e\u0440\u043e\u0434\u0435, \u043f\u0440\u0438\u0447\u0435\u043c \u043c\u0430\u0442\u044c \u0438 \u043e\u0442\u0435\u0446 \u043d\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u043b\u0438 \u043a\u043e\u043b\u043b\u0435\u0434\u0436 &#8212; 2188. \u041b\u044e\u0434\u0435\u0439 \u0441 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c &#8212; 9.<\/p>\n<p>\u0421\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 &#8212; \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0435\u0449\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0438<\/p>\n<pre><code class=\"r\">upset(CollegeDistance, tab_2, annotations = list('Distribution of Score'=(   ggplot(mapping=aes(y=score))   + geom_violin(alpha=0.5, na.rm=TRUE))))<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 ggplot2, \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a \u0441\u043a\u0440\u0438\u043f\u0438\u0447\u043d\u044b\u0435 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f &#171;score&#187; \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b.<\/p>\n<p>\u0415\u0449\u0435 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0439 \u0431\u043e\u043d\u0443\u0441 &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442 \u043d\u0435\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0442\u0435\u0441\u0442 \u041a\u0440\u0443\u0441\u043a\u0430\u043b\u0430-\u0423\u043e\u043b\u043b\u0438\u0441\u0430 \u043d\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u043c\u0435\u0434\u0438\u0430\u043d \u043f\u043e \u0432\u0441\u0435\u043c \u043f\u043e\u0434\u0432\u044b\u0431\u043e\u0440\u043a\u0430\u043c, \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0435\u0439 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445.<\/p>\n<pre><code class=\"r\">upset_test(CollegeDistance, tab_2)<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0438\u0437 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f &#171;\u0437\u0430\u0440\u0430\u0431\u043e\u0442\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0430&#187;, \u0430 \u0432\u044b\u0448\u0435 \u0432\u0441\u0435\u0433\u043e &#8212; \u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f &#171;\u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435&#187;.<\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0443 \u043f\u0430\u043a\u0435\u0442\u0430 \u0435\u0441\u0442\u044c \u0448\u0438\u043a\u0430\u0440\u043d\u0430\u044f \u0432\u0438\u043d\u044c\u0435\u0442\u043a\u0430 (<a href=\"https:\/\/cran.r-project.org\/web\/packages\/ComplexUpset\/vignettes\/Examples_R.html\" rel=\"noopener noreferrer nofollow\">https:\/\/cran.r-project.org\/web\/packages\/ComplexUpset\/vignettes\/Examples_R.html<\/a>), \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430.<\/p>\n<\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/599693\/\"> https:\/\/habr.com\/ru\/post\/599693\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-326839","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/326839","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=326839"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/326839\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=326839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=326839"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=326839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}