{"id":1804,"date":"2023-07-24T22:24:27","date_gmt":"2023-07-24T22:24:27","guid":{"rendered":"https:\/\/statorials.org\/nl\/combinaties-permutaties-in-r\/"},"modified":"2023-07-24T22:24:27","modified_gmt":"2023-07-24T22:24:27","slug":"combinaties-permutaties-in-r","status":"publish","type":"post","link":"https:\/\/statorials.org\/nl\/combinaties-permutaties-in-r\/","title":{"rendered":"Hoe combinaties en permutaties in r te berekenen"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">U kunt de volgende functies gebruiken om combinaties en permutaties in R te berekenen:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#calculate total combinations of size <em>r<\/em> from <em>n<\/em> total objects\n<span style=\"color: #3366ff;\">choose<\/span> <span style=\"color: #000000;\">(n,r)<\/span>\n\n#calculate total permutations of size <em>r<\/em> from <em>n<\/em> total objects<\/span>\n<span style=\"color: #3366ff;\">choose<\/span> (n, r) * <span style=\"color: #3366ff;\">factorial<\/span> (r)\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">De volgende voorbeelden laten zien hoe u elk van deze functies in de praktijk kunt gebruiken.<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Voorbeeld 1: Bereken totaalcombinaties<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\"><strong>Combinaties<\/strong> vertegenwoordigen manieren om een steekproef te selecteren uit een groep objecten waarbij de <em>volgorde van de objecten er niet toe doet<\/em> .<\/span><\/p>\n<p> <span style=\"color: #000000;\">Stel dat we bijvoorbeeld een zak met vier knikkers hebben: rood, blauw, groen en geel. Stel dat we willekeurig twee knikkers uit de zak willen selecteren, zonder ze te vervangen.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Dit zijn de verschillende combinaties van ballen die we kunnen selecteren:<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">{Rood blauw}<\/span><\/li>\n<li> <span style=\"color: #000000;\">{Rood groen}<\/span><\/li>\n<li> <span style=\"color: #000000;\">{Rood Geel}<\/span><\/li>\n<li> <span style=\"color: #000000;\">{Blauw groen}<\/span><\/li>\n<li> <span style=\"color: #000000;\">{blauw Geel}<\/span><\/li>\n<li> <span style=\"color: #000000;\">{Groen Geel}<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\">Er zijn in totaal <strong>6<\/strong> combinaties.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Zo bereken je het totale aantal combinaties in R:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#calculate total combinations of size <em>2<\/em> from <em>4<\/em> total objects\n<\/span><span style=\"color: #3366ff;\">choose<\/span> (4, 2)\n\n[1] 6\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">Ons antwoord komt overeen met het aantal combinaties dat we handmatig hebben berekend.<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Voorbeeld 2: Bereken de totale permutaties<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\"><b>Permutaties<\/b> vertegenwoordigen manieren om een steekproef te selecteren uit een groep objecten waarbij de <em>volgorde van de objecten van belang is<\/em> .<\/span><\/p>\n<p> <span style=\"color: #000000;\">Stel dat we bijvoorbeeld een zak met vier knikkers hebben: rood, blauw, groen en geel.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Stel dat we willekeurig twee knikkers uit de zak willen selecteren, zonder ze te vervangen.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Hier zijn de verschillende permutaties van knikkers die we kunnen selecteren:<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">{rood, blauw}, {blauw, rood}<\/span><\/li>\n<li> <span style=\"color: #000000;\">{rood, groen}, {groen, rood}<\/span><\/li>\n<li> <span style=\"color: #000000;\">{rood, geel}, {geel, rood}<\/span><\/li>\n<li> <span style=\"color: #000000;\">{blauw, groen}, {groen, blauw}<\/span><\/li>\n<li> <span style=\"color: #000000;\">{blauw, geel}, {geel, blauw}<\/span><\/li>\n<li> <span style=\"color: #000000;\">{groen, geel}, {geel, groen}<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\">Er zijn in totaal <strong>12<\/strong> permutaties.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Zo bereken je het totale aantal permutaties in R:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#calculate total permutations of size <em>2<\/em> from <em>4<\/em> total objects\n<\/span><span style=\"color: #3366ff;\">choose<\/span> (4, 2) * <span style=\"color: #3366ff;\">factorial<\/span> (2)\n\n[1] 12\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">Ons antwoord komt overeen met het aantal permutaties dat we handmatig hebben berekend.<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Aanvullende bronnen<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">In de volgende tutorials wordt uitgelegd hoe u andere veelvoorkomende taken in R kunt uitvoeren:<\/span><\/p>\n<p> <a href=\"https:\/\/statorials.org\/nl\/lineaire-interpolatie-in-r\/\" target=\"_blank\" rel=\"noopener\">Lineaire interpolatie uitvoeren in R (met voorbeeld)<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/r-enkele-lijnen\/\" target=\"_blank\" rel=\"noopener\">Hoe u afzonderlijke rijen in een dataframe selecteert in R<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/repliceer-lijnen-in-r\/\">Rijen repliceren in een dataframe in R<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>U kunt de volgende functies gebruiken om combinaties en permutaties in R te berekenen: #calculate total combinations of size r from n total objects choose (n,r) #calculate total permutations of size r from n total objects choose (n, r) * factorial (r) De volgende voorbeelden laten zien hoe u elk van deze functies in de [&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":[],"class_list":["post-1804","post","type-post","status-publish","format-standard","hentry","category-gids"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Hoe combinaties en permutaties in R te berekenen<\/title>\n<meta name=\"description\" content=\"In deze tutorial wordt uitgelegd hoe je combinaties en permutaties in R kunt berekenen, met verschillende voorbeelden.\" \/>\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\/nl\/combinaties-permutaties-in-r\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hoe combinaties en permutaties in R te berekenen\" \/>\n<meta property=\"og:description\" content=\"In deze tutorial wordt uitgelegd hoe je combinaties en permutaties in R kunt berekenen, met verschillende voorbeelden.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/nl\/combinaties-permutaties-in-r\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-24T22:24:27+00:00\" \/>\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\u00a0Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/nl\/combinaties-permutaties-in-r\/\",\"url\":\"https:\/\/statorials.org\/nl\/combinaties-permutaties-in-r\/\",\"name\":\"Hoe combinaties en permutaties in R te berekenen\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/nl\/#website\"},\"datePublished\":\"2023-07-24T22:24:27+00:00\",\"dateModified\":\"2023-07-24T22:24:27+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219\"},\"description\":\"In deze tutorial wordt uitgelegd hoe je combinaties en permutaties in R kunt berekenen, met verschillende voorbeelden.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/nl\/combinaties-permutaties-in-r\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/nl\/combinaties-permutaties-in-r\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/nl\/combinaties-permutaties-in-r\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Thuis\",\"item\":\"https:\/\/statorials.org\/nl\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hoe combinaties en permutaties in r te berekenen\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/nl\/#website\",\"url\":\"https:\/\/statorials.org\/nl\/\",\"name\":\"Statorials\",\"description\":\"Uw gids voor statistische competentie\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/nl\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"de\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219\",\"name\":\"Dr.benjamin anderson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/statorials.org\/nl\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"http:\/\/statorials.org\/nl\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"caption\":\"Dr.benjamin anderson\"},\"description\":\"Ik ben Benjamin, een gepensioneerde hoogleraar statistiek die nu een toegewijde Statorials-lesgever is. Ik heb uitgebreide ervaring en expertise op het gebied van statistiek en ik ben vastbesloten om mijn kennis te delen met studenten via Statorials. Lees verder\",\"sameAs\":[\"http:\/\/statorials.org\/nl\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Hoe combinaties en permutaties in R te berekenen","description":"In deze tutorial wordt uitgelegd hoe je combinaties en permutaties in R kunt berekenen, met verschillende voorbeelden.","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\/nl\/combinaties-permutaties-in-r\/","og_locale":"de_DE","og_type":"article","og_title":"Hoe combinaties en permutaties in R te berekenen","og_description":"In deze tutorial wordt uitgelegd hoe je combinaties en permutaties in R kunt berekenen, met verschillende voorbeelden.","og_url":"https:\/\/statorials.org\/nl\/combinaties-permutaties-in-r\/","og_site_name":"Statorials","article_published_time":"2023-07-24T22:24:27+00:00","author":"Dr.benjamin anderson","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"Dr.benjamin anderson","Gesch\u00e4tzte Lesezeit":"2\u00a0Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/nl\/combinaties-permutaties-in-r\/","url":"https:\/\/statorials.org\/nl\/combinaties-permutaties-in-r\/","name":"Hoe combinaties en permutaties in R te berekenen","isPartOf":{"@id":"https:\/\/statorials.org\/nl\/#website"},"datePublished":"2023-07-24T22:24:27+00:00","dateModified":"2023-07-24T22:24:27+00:00","author":{"@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219"},"description":"In deze tutorial wordt uitgelegd hoe je combinaties en permutaties in R kunt berekenen, met verschillende voorbeelden.","breadcrumb":{"@id":"https:\/\/statorials.org\/nl\/combinaties-permutaties-in-r\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/nl\/combinaties-permutaties-in-r\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/nl\/combinaties-permutaties-in-r\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Thuis","item":"https:\/\/statorials.org\/nl\/"},{"@type":"ListItem","position":2,"name":"Hoe combinaties en permutaties in r te berekenen"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/nl\/#website","url":"https:\/\/statorials.org\/nl\/","name":"Statorials","description":"Uw gids voor statistische competentie","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/nl\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"de"},{"@type":"Person","@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219","name":"Dr.benjamin anderson","image":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/image\/","url":"http:\/\/statorials.org\/nl\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","contentUrl":"http:\/\/statorials.org\/nl\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","caption":"Dr.benjamin anderson"},"description":"Ik ben Benjamin, een gepensioneerde hoogleraar statistiek die nu een toegewijde Statorials-lesgever is. Ik heb uitgebreide ervaring en expertise op het gebied van statistiek en ik ben vastbesloten om mijn kennis te delen met studenten via Statorials. Lees verder","sameAs":["http:\/\/statorials.org\/nl"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts\/1804","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/comments?post=1804"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts\/1804\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/media?parent=1804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/categories?post=1804"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/tags?post=1804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}