{"id":3649,"date":"2023-07-16T08:34:06","date_gmt":"2023-07-16T08:34:06","guid":{"rendered":"https:\/\/statorials.org\/nl\/lengtefunctie-van-de-luchtsluis\/"},"modified":"2023-07-16T08:34:06","modified_gmt":"2023-07-16T08:34:06","slug":"lengtefunctie-van-de-luchtsluis","status":"publish","type":"post","link":"https:\/\/statorials.org\/nl\/lengtefunctie-van-de-luchtsluis\/","title":{"rendered":"Hoe de length-functie in sas te gebruiken (met voorbeelden)"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">U kunt de functie <b>LENGTH<\/b> in SAS gebruiken om de lengte van tekenvariabelen te berekenen, met uitzondering van volgspaties.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Deze functie gebruikt de volgende basissyntaxis:<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>LENGTE(uitdrukking)<\/strong><\/span><\/p>\n<p> <span style=\"color: #000000;\">Goud:<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><strong>expressie<\/strong> : de tekenreeks die moet worden geanalyseerd<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\">Het volgende voorbeeld laat zien hoe u deze functie in de praktijk kunt gebruiken.<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Voorbeeld: gebruik van de LENGTH-functie in SAS<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">Laten we aannemen dat we de volgende gegevensset in SAS hebben:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">\/*create dataset*\/<span style=\"color: #000000;\"><span style=\"color: #800080;\">\ndata<\/span> original_data;\n    <span style=\"color: #3366ff;\">input<\/span> team $1-21 points;\n    <span style=\"color: #3366ff;\">datalines<\/span> ;\nGolden State Warriors 99\nBrooklyn Nets 101\nUtah Jazz 105\nCleveland Cavs 100\nAtlanta Hawks 109\nMilwaukee Bucks 98\nMiami Heat 93\nHouston Rockets 100\nLos Angeles Lakers 112\n;\n<span style=\"color: #800080;\">run<\/span> ;\n\n<span style=\"color: #008000;\">\/*view dataset*\/\n<\/span><span style=\"color: #800080;\">proc print<\/span> <span style=\"color: #3366ff;\">data<\/span> = original_data;<\/span><\/span><\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-29941 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/longueur1.jpg\" alt=\"\" width=\"253\" height=\"253\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">We kunnen de <b>LENGTH-<\/b> functie gebruiken om de lengte van elke string in de teamkolom te berekenen:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #800080;\"><span style=\"color: #008000;\">\/*calculate length of each string in team column*\/\n<span style=\"color: #000000;\"><span style=\"color: #800080;\">data<\/span> new_data;\n    <span style=\"color: #3366ff;\">set<\/span> original_data;\n    team_length = <span style=\"color: #3366ff;\">length<\/span> (team);\n<span style=\"color: #800080;\">run<\/span> ;\n\n<span style=\"color: #008000;\">\/*view results*\/\n<\/span><span style=\"color: #800080;\">proc print<\/span> <span style=\"color: #3366ff;\">data<\/span> = new_data;\n<\/span><\/span><\/span><\/strong><\/span><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-29942\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/longueur2.jpg\" alt=\"LENGTH-functie in SAS\" width=\"361\" height=\"276\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">De nieuwe kolom met de naam <b>team_length<\/b> geeft de lengte van elke tekenreeks in de <strong>teamkolom<\/strong> weer.<\/span><\/p>\n<p> <span style=\"color: #000000;\"><span style=\"color: #000000;\">Bijvoorbeeld:<\/span><\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">De ketting &#8222;Golden State Warriors&#8220; heeft een lengte van <strong>21 stuks<\/strong> .<\/span><\/li>\n<li> <span style=\"color: #000000;\">De snaar \u201cBrooklyn Nets\u201d heeft een lengte van <strong>13<\/strong> .<\/span><\/li>\n<li> <span style=\"color: #000000;\">De \u201cUtah Jazz\u201d-snaar heeft een lengte van <strong>9<\/strong> .<\/span><\/li>\n<li> <span style=\"color: #000000;\">Het \u201cCleveland Cavs\u201d touw heeft een lengte van <strong>14<\/strong> .<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\">Enzovoort.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Houd er rekening mee dat de <strong>LENGTH-<\/strong> functie spaties tussen woorden als tekens telt, maar de volgende spaties niet als tekens.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Als u de lengte van een tekenvariabele wilt berekenen, <em>inclusief<\/em> volgspaties, gebruikt u in plaats daarvan de functie <a href=\"https:\/\/documentation.sas.com\/doc\/en\/pgmsascdc\/9.4_3.5\/ds2ref\/p1nj54puvp0rs8n1kesr6rpzq1a4.htm\" target=\"_blank\" rel=\"noopener\">LENGTHC<\/a> .<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Aanvullende bronnen<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">In de volgende zelfstudies wordt uitgelegd hoe u andere veelvoorkomende functies in SAS kunt gebruiken:<\/span><\/p>\n<p> <a href=\"https:\/\/statorials.org\/nl\/onder-luchtsluisfunctie\/\" target=\"_blank\" rel=\"noopener\">Hoe de SUBSTR-functie in SAS te gebruiken<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/compressiefunctie-voor-luchtsluis\/\" target=\"_blank\" rel=\"noopener\">Hoe de COMPRESS-functie in SAS te gebruiken<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/sas-zoekfunctie\/\" target=\"_blank\" rel=\"noopener\">Hoe de FIND-functie in SAS te gebruiken<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/niet-samenvoegen\/\" target=\"_blank\" rel=\"noopener\">Hoe de COALESCE-functie in SAS te gebruiken<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>U kunt de functie LENGTH in SAS gebruiken om de lengte van tekenvariabelen te berekenen, met uitzondering van volgspaties. Deze functie gebruikt de volgende basissyntaxis: LENGTE(uitdrukking) Goud: expressie : de tekenreeks die moet worden geanalyseerd Het volgende voorbeeld laat zien hoe u deze functie in de praktijk kunt gebruiken. Voorbeeld: gebruik van de LENGTH-functie in [&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-3649","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 de LENGTH-functie in SAS te gebruiken (met voorbeelden) - Statorials<\/title>\n<meta name=\"description\" content=\"In deze zelfstudie wordt met voorbeelden uitgelegd hoe u de functie LENGTH in SAS gebruikt om de lengte van tekenvariabelen te berekenen.\" \/>\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\/lengtefunctie-van-de-luchtsluis\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hoe de LENGTH-functie in SAS te gebruiken (met voorbeelden) - Statorials\" \/>\n<meta property=\"og:description\" content=\"In deze zelfstudie wordt met voorbeelden uitgelegd hoe u de functie LENGTH in SAS gebruikt om de lengte van tekenvariabelen te berekenen.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/nl\/lengtefunctie-van-de-luchtsluis\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-16T08:34:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/longueur1.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=\"1\u00a0Minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/nl\/lengtefunctie-van-de-luchtsluis\/\",\"url\":\"https:\/\/statorials.org\/nl\/lengtefunctie-van-de-luchtsluis\/\",\"name\":\"Hoe de LENGTH-functie in SAS te gebruiken (met voorbeelden) - Statorials\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/nl\/#website\"},\"datePublished\":\"2023-07-16T08:34:06+00:00\",\"dateModified\":\"2023-07-16T08:34:06+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219\"},\"description\":\"In deze zelfstudie wordt met voorbeelden uitgelegd hoe u de functie LENGTH in SAS gebruikt om de lengte van tekenvariabelen te berekenen.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/nl\/lengtefunctie-van-de-luchtsluis\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/nl\/lengtefunctie-van-de-luchtsluis\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/nl\/lengtefunctie-van-de-luchtsluis\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Thuis\",\"item\":\"https:\/\/statorials.org\/nl\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hoe de length-functie in sas te gebruiken (met voorbeelden)\"}]},{\"@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 de LENGTH-functie in SAS te gebruiken (met voorbeelden) - Statorials","description":"In deze zelfstudie wordt met voorbeelden uitgelegd hoe u de functie LENGTH in SAS gebruikt om de lengte van tekenvariabelen te berekenen.","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\/lengtefunctie-van-de-luchtsluis\/","og_locale":"de_DE","og_type":"article","og_title":"Hoe de LENGTH-functie in SAS te gebruiken (met voorbeelden) - Statorials","og_description":"In deze zelfstudie wordt met voorbeelden uitgelegd hoe u de functie LENGTH in SAS gebruikt om de lengte van tekenvariabelen te berekenen.","og_url":"https:\/\/statorials.org\/nl\/lengtefunctie-van-de-luchtsluis\/","og_site_name":"Statorials","article_published_time":"2023-07-16T08:34:06+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/longueur1.jpg"}],"author":"Dr.benjamin anderson","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"Dr.benjamin anderson","Gesch\u00e4tzte Lesezeit":"1\u00a0Minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/nl\/lengtefunctie-van-de-luchtsluis\/","url":"https:\/\/statorials.org\/nl\/lengtefunctie-van-de-luchtsluis\/","name":"Hoe de LENGTH-functie in SAS te gebruiken (met voorbeelden) - Statorials","isPartOf":{"@id":"https:\/\/statorials.org\/nl\/#website"},"datePublished":"2023-07-16T08:34:06+00:00","dateModified":"2023-07-16T08:34:06+00:00","author":{"@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219"},"description":"In deze zelfstudie wordt met voorbeelden uitgelegd hoe u de functie LENGTH in SAS gebruikt om de lengte van tekenvariabelen te berekenen.","breadcrumb":{"@id":"https:\/\/statorials.org\/nl\/lengtefunctie-van-de-luchtsluis\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/nl\/lengtefunctie-van-de-luchtsluis\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/nl\/lengtefunctie-van-de-luchtsluis\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Thuis","item":"https:\/\/statorials.org\/nl\/"},{"@type":"ListItem","position":2,"name":"Hoe de length-functie in sas te gebruiken (met voorbeelden)"}]},{"@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\/3649","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=3649"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts\/3649\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/media?parent=3649"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/categories?post=3649"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/tags?post=3649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}