{"id":2906,"date":"2023-07-20T03:54:11","date_gmt":"2023-07-20T03:54:11","guid":{"rendered":"https:\/\/statorials.org\/de\/boxplot-in-r-neu-anordnen\/"},"modified":"2023-07-20T03:54:11","modified_gmt":"2023-07-20T03:54:11","slug":"boxplot-in-r-neu-anordnen","status":"publish","type":"post","link":"https:\/\/statorials.org\/de\/boxplot-in-r-neu-anordnen\/","title":{"rendered":"So ordnen sie boxplots in r neu an (mit beispielen)"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">H\u00e4ufig m\u00f6chten Sie Boxplots in R neu anordnen.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Die folgenden Beispiele zeigen, wie das mit zwei verschiedenen Methoden geht:<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><strong>Methode 1:<\/strong> Neu anordnen basierend auf einer bestimmten Reihenfolge<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong>Methode 2:<\/strong> Neu anordnen basierend auf dem Boxplot-Medianwert<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\">In jedem Beispiel wird der integrierte <strong>Luftqualit\u00e4tsdatensatz<\/strong> in R verwendet:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#view first six lines of <em>air quality<\/em> data\n<\/span>head(airquality)\n\n  Ozone Solar.R Wind Temp Month Day\n1 41 190 7.4 67 5 1\n2 36 118 8.0 72 5 2\n3 12 149 12.6 74 5 3\n4 18 313 11.5 62 5 4\n5 NA NA 14.3 56 5 5\n6 28 NA 14.9 66 5 6\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">So sieht ein Mehrfach-Boxplot-Diagramm f\u00fcr diesen Datensatz ohne Angabe einer Reihenfolge aus:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#create boxplot that shows distribution of temperature by month\n<span style=\"color: #000000;\">boxplot(Temp~Month, data=airquality, col=\" <span style=\"color: #ff0000;\">lightblue<\/span> \", border=\" <span style=\"color: #ff0000;\">black<\/span> \")<\/span>\n<\/span><\/strong><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-25343 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/commande1-1.jpg\" alt=\"\" width=\"440\" height=\"397\" srcset=\"\" sizes=\"\"><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Beispiel 1: Boxplots basierend auf einer bestimmten Reihenfolge neu anordnen<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">Der folgende Code zeigt, wie die Boxplots basierend auf der folgenden Reihenfolge f\u00fcr die Variable <strong>\u201eMonat\u201c<\/strong> sortiert werden: 5, 8, 6, 9, 7.<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#reorder Month values\n<\/span>airquality$Month &lt;- factor(airquality$Month , <span style=\"color: #3366ff;\">levels<\/span> =c(5, 8, 6, 9, 7))\n\n<span style=\"color: #008080;\">#create boxplot of temperatures by month using the order we specified\n<\/span>boxplot(Temp~Month, data=airquality, col=\" <span style=\"color: #ff0000;\">lightblue<\/span> \", border=\" <span style=\"color: #ff0000;\">black<\/span> \")\n<\/strong><\/span><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-25344 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/commande2-1.jpg\" alt=\"\" width=\"440\" height=\"404\" srcset=\"\" sizes=\"\"><\/p>\n<p> <span style=\"color: #000000;\"><span style=\"color: #000000;\">Beachten Sie, dass die Boxplots jetzt in der Reihenfolge angezeigt werden, die wir mit dem Argument \u201e <strong>levels\u201c<\/strong> angegeben haben.<\/span><\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>Verwandt:<\/strong> <a href=\"https:\/\/statorials.org\/de\/faktorstufen-in-r-neu-anordnen\/\" target=\"_blank\" rel=\"noopener\">So ordnen Sie Faktorstufen in R neu an<\/a><\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Beispiel 2: Boxplots basierend auf dem Medianwert neu anordnen<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">Der folgende Code zeigt, wie die Boxplots basierend auf dem mittleren Temperaturwert f\u00fcr jeden Monat in <strong>aufsteigender Reihenfolge<\/strong> angeordnet werden:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#reorder Month values in ascending order based on median value of Temp\n<\/span>airquality$Month &lt;- with(airquality, reorder(Month, Temp, median, na. <span style=\"color: #3366ff;\">rm<\/span> = <span style=\"color: #008000;\">T<\/span> ))\n\n<span style=\"color: #008080;\">#create boxplot of temperatures by month\n<\/span>boxplot(Temp~Month, data=airquality, col=\" <span style=\"color: #ff0000;\">lightblue<\/span> \", border=\" <span style=\"color: #ff0000;\">black<\/span> \")<\/strong><\/span> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-25345 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/commande3-1.jpg\" alt=\"\" width=\"448\" height=\"410\" srcset=\"\" sizes=\"\"><\/p>\n<p> <span style=\"color: #000000;\">Boxplots werden jetzt in aufsteigender Reihenfolge basierend auf dem Medianwert f\u00fcr jeden Monat angezeigt.<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>Hinweis<\/strong> : Der Medianwert jedes Boxplots ist die horizontale schwarze Linie, die durch die Mitte jeder Box verl\u00e4uft.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Wir k\u00f6nnen die Boxplots auch in <strong>absteigender Reihenfolge<\/strong> ordnen, indem wir in der <strong>Neuordnungsfunktion<\/strong> ein negatives Vorzeichen vor \u201eTemp\u201c verwenden:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#reorder Month values in descending order based on median value of Temp\n<\/span>airquality$Month &lt;- with(airquality, reorder(Month, -Temp, median, na. <span style=\"color: #3366ff;\">rm<\/span> = <span style=\"color: #008000;\">T<\/span> ))\n\n<span style=\"color: #008080;\">#create boxplot of temperatures by month\n<\/span>boxplot(Temp~Month, data=airquality, col=\" <span style=\"color: #ff0000;\">lightblue<\/span> \", border=\" <span style=\"color: #ff0000;\">black<\/span> \")<\/strong><\/span> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-25346 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/commande4.jpg\" alt=\"\" width=\"446\" height=\"414\" srcset=\"\" sizes=\"\"><\/p>\n<p> <span style=\"color: #000000;\">Boxplots werden jetzt in absteigender Reihenfolge basierend auf dem Medianwert f\u00fcr jeden Monat angezeigt.<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Zus\u00e4tzliche Ressourcen<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">In den folgenden Tutorials wird erl\u00e4utert, wie andere g\u00e4ngige Vorg\u00e4nge in R ausgef\u00fchrt werden:<\/span><\/p>\n<p> <a href=\"https:\/\/statorials.org\/de\/mehrere-boxplots-r\/\" target=\"_blank\" rel=\"noopener\">So zeichnen Sie mehrere Boxplots in R<\/a><br \/> <a href=\"https:\/\/statorials.org\/de\/horizontaler-boxplot-in-r\/\" target=\"_blank\" rel=\"noopener\">So erstellen Sie horizontale Boxplots in R<\/a><br \/> <a href=\"https:\/\/statorials.org\/de\/ausreisser-in-boxplots-entfernen-r\/\" target=\"_blank\" rel=\"noopener\">So entfernen Sie Ausrei\u00dfer in Boxplots in R<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>H\u00e4ufig m\u00f6chten Sie Boxplots in R neu anordnen. Die folgenden Beispiele zeigen, wie das mit zwei verschiedenen Methoden geht: Methode 1: Neu anordnen basierend auf einer bestimmten Reihenfolge Methode 2: Neu anordnen basierend auf dem Boxplot-Medianwert In jedem Beispiel wird der integrierte Luftqualit\u00e4tsdatensatz in R verwendet: #view first six lines of air quality data head(airquality) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>So ordnen Sie Boxplots in R neu an (mit Beispielen) \u2013 Statistik<\/title>\n<meta name=\"description\" content=\"In diesem Tutorial wird anhand mehrerer Beispiele erl\u00e4utert, wie Boxplots in R neu angeordnet werden.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/statorials.org\/de\/boxplot-in-r-neu-anordnen\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"So ordnen Sie Boxplots in R neu an (mit Beispielen) \u2013 Statistik\" \/>\n<meta property=\"og:description\" content=\"In diesem Tutorial wird anhand mehrerer Beispiele erl\u00e4utert, wie Boxplots in R neu angeordnet werden.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/de\/boxplot-in-r-neu-anordnen\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-20T03:54:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/commande1-1.jpg\" \/>\n<meta name=\"author\" content=\"Dr. Benjamin Anderson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dr. Benjamin Anderson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/de\/boxplot-in-r-neu-anordnen\/\",\"url\":\"https:\/\/statorials.org\/de\/boxplot-in-r-neu-anordnen\/\",\"name\":\"So ordnen Sie Boxplots in R neu an (mit Beispielen) \u2013 Statistik\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/de\/#website\"},\"datePublished\":\"2023-07-20T03:54:11+00:00\",\"dateModified\":\"2023-07-20T03:54:11+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0\"},\"description\":\"In diesem Tutorial wird anhand mehrerer Beispiele erl\u00e4utert, wie Boxplots in R neu angeordnet werden.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/de\/boxplot-in-r-neu-anordnen\/#breadcrumb\"},\"inLanguage\":\"de-DE\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/de\/boxplot-in-r-neu-anordnen\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/de\/boxplot-in-r-neu-anordnen\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Heim\",\"item\":\"https:\/\/statorials.org\/de\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"So ordnen sie boxplots in r neu an (mit beispielen)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/de\/#website\",\"url\":\"https:\/\/statorials.org\/de\/\",\"name\":\"Statorials\",\"description\":\"Ihr Leitfaden f\u00fcr statistische Kompetenz !\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/de\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"de-DE\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0\",\"name\":\"Dr. Benjamin Anderson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de-DE\",\"@id\":\"https:\/\/statorials.org\/de\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/statorials.org\/de\/wp-content\/uploads\/2023\/11\/Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"https:\/\/statorials.org\/de\/wp-content\/uploads\/2023\/11\/Benjamin-Anderson-96x96.jpg\",\"caption\":\"Dr. Benjamin Anderson\"},\"description\":\"Hallo, ich bin Benjamin, ein pensionierter Statistikprofessor, der sich zum engagierten Statorials-Lehrer entwickelt hat. Mit umfassender Erfahrung und Fachwissen auf dem Gebiet der Statistik bin ich bestrebt, mein Wissen zu teilen, um Studenten durch Statorials zu bef\u00e4higen. Mehr wissen\",\"sameAs\":[\"https:\/\/statorials.org\/de\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"So ordnen Sie Boxplots in R neu an (mit Beispielen) \u2013 Statistik","description":"In diesem Tutorial wird anhand mehrerer Beispiele erl\u00e4utert, wie Boxplots in R neu angeordnet werden.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/statorials.org\/de\/boxplot-in-r-neu-anordnen\/","og_locale":"de_DE","og_type":"article","og_title":"So ordnen Sie Boxplots in R neu an (mit Beispielen) \u2013 Statistik","og_description":"In diesem Tutorial wird anhand mehrerer Beispiele erl\u00e4utert, wie Boxplots in R neu angeordnet werden.","og_url":"https:\/\/statorials.org\/de\/boxplot-in-r-neu-anordnen\/","og_site_name":"Statorials","article_published_time":"2023-07-20T03:54:11+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/commande1-1.jpg"}],"author":"Dr. Benjamin Anderson","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"Dr. Benjamin Anderson","Gesch\u00e4tzte Lesezeit":"2 Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/de\/boxplot-in-r-neu-anordnen\/","url":"https:\/\/statorials.org\/de\/boxplot-in-r-neu-anordnen\/","name":"So ordnen Sie Boxplots in R neu an (mit Beispielen) \u2013 Statistik","isPartOf":{"@id":"https:\/\/statorials.org\/de\/#website"},"datePublished":"2023-07-20T03:54:11+00:00","dateModified":"2023-07-20T03:54:11+00:00","author":{"@id":"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0"},"description":"In diesem Tutorial wird anhand mehrerer Beispiele erl\u00e4utert, wie Boxplots in R neu angeordnet werden.","breadcrumb":{"@id":"https:\/\/statorials.org\/de\/boxplot-in-r-neu-anordnen\/#breadcrumb"},"inLanguage":"de-DE","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/de\/boxplot-in-r-neu-anordnen\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/de\/boxplot-in-r-neu-anordnen\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Heim","item":"https:\/\/statorials.org\/de\/"},{"@type":"ListItem","position":2,"name":"So ordnen sie boxplots in r neu an (mit beispielen)"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/de\/#website","url":"https:\/\/statorials.org\/de\/","name":"Statorials","description":"Ihr Leitfaden f\u00fcr statistische Kompetenz !","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/de\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"de-DE"},{"@type":"Person","@id":"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0","name":"Dr. Benjamin Anderson","image":{"@type":"ImageObject","inLanguage":"de-DE","@id":"https:\/\/statorials.org\/de\/#\/schema\/person\/image\/","url":"https:\/\/statorials.org\/de\/wp-content\/uploads\/2023\/11\/Benjamin-Anderson-96x96.jpg","contentUrl":"https:\/\/statorials.org\/de\/wp-content\/uploads\/2023\/11\/Benjamin-Anderson-96x96.jpg","caption":"Dr. Benjamin Anderson"},"description":"Hallo, ich bin Benjamin, ein pensionierter Statistikprofessor, der sich zum engagierten Statorials-Lehrer entwickelt hat. Mit umfassender Erfahrung und Fachwissen auf dem Gebiet der Statistik bin ich bestrebt, mein Wissen zu teilen, um Studenten durch Statorials zu bef\u00e4higen. Mehr wissen","sameAs":["https:\/\/statorials.org\/de"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/posts\/2906"}],"collection":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/comments?post=2906"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/posts\/2906\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/media?parent=2906"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/categories?post=2906"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/tags?post=2906"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}