{"id":4622,"date":"2023-07-09T13:47:28","date_gmt":"2023-07-09T13:47:28","guid":{"rendered":"https:\/\/statorials.org\/nl\/linker-functie-luchtsluis\/"},"modified":"2023-07-09T13:47:28","modified_gmt":"2023-07-09T13:47:28","slug":"linker-functie-luchtsluis","status":"publish","type":"post","link":"https:\/\/statorials.org\/nl\/linker-functie-luchtsluis\/","title":{"rendered":"Hoe de links-functie in sas te gebruiken (met voorbeeld)"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">U kunt de <b>LEFT-<\/b> functie in SAS gebruiken om tekenreeksen links uit te lijnen.<\/span><\/p>\n<p> <span style=\"color: #000000;\">De <strong>LEFT-<\/strong> functie verplaatst alle voorafgaande spaties naar het einde van de string, wat tot gevolg heeft dat de tekst links wordt uitgelijnd zonder dat de lengte van de string daadwerkelijk verandert.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Het volgende voorbeeld laat zien hoe u de <b>LINKS-<\/b> functie in de praktijk kunt gebruiken.<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Voorbeeld: hoe u de LINKS-functie in SAS gebruikt<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">Stel dat we de volgende dataset in SAS hebben met de namen van verschillende basketbalteams:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008000;\">\/*create first dataset*\/\n<\/span><span style=\"color: #800080;\">data<\/span> my_data;\n    <span style=\"color: #3366ff;\">input<\/span> team <span style=\"color: #339966;\">$char20.<\/span> ;\n    <span style=\"color: #3366ff;\">datalines<\/span> ;\n   Mavericks\nKings\n Hawks\n      Thunder\n    Rockets\nBlazers\n Nets\n;\n<span style=\"color: #800080;\">run<\/span> ;\n\n<span style=\"color: #008000;\">\/*view dataset*\/\n<\/span><span style=\"color: #800080;\">proc report<\/span> <span style=\"color: #3366ff;\">data<\/span> =my_data;\n    <span style=\"color: #3366ff;\">define<\/span> team \/ <span style=\"color: #3366ff;\">display style<\/span> =[asis=on];\n<span style=\"color: #800080;\">run<\/span> ;\n<\/strong><\/span><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-36054 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/lf11.png\" alt=\"\" width=\"109\" height=\"239\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\"><strong>Opmerking<\/strong> : we hebben <strong>PROC REPORT<\/strong> gebruikt met de optie <strong>DISPLAY STYLE=[ASIS=ON]<\/strong> om SAS te dwingen spaties in de uitvoer weer te geven.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Houd er rekening mee dat bij sommige teamnamen meerdere spaties aan het begin van de pagina staan.<\/span><\/p>\n<p> <span style=\"color: #000000;\">We kunnen een nieuwe dataset maken waarbij we de functie <b>LINKS<\/b> gebruiken om elk van de eerste spaties van elke teamnaam naar het einde van de string te verplaatsen:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008000;\">\/*create new dataset*\/\n<\/span><span style=\"color: #800080;\">data<\/span> new_data;\n    <span style=\"color: #3366ff;\">set<\/span> my_data;\n    team_left = <span style=\"color: #3366ff;\">left<\/span> (team);\n<span style=\"color: #800080;\">run<\/span> ;\n\n<span style=\"color: #008000;\">\/*view new dataset*\/\n<\/span><span style=\"color: #800080;\">proc report<\/span> <span style=\"color: #3366ff;\">data<\/span> =new_data;\n    <span style=\"color: #3366ff;\">define<\/span> team \/ <span style=\"color: #3366ff;\">display style<\/span> =[asis=on];\n<span style=\"color: #800080;\">run<\/span> ;\n<\/strong><\/span><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-36055 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/lf12.png\" alt=\"\" width=\"201\" height=\"243\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">Merk op dat elk van de namen in de kolom <strong>team_left<\/strong> nu links uitgelijnd is.<\/span><\/p>\n<p> <span style=\"color: #000000;\">De <b>LEFT-<\/b> functie verplaatste alle voorafgaande spaties van elke teamnaam naar het einde van de string, wat tot gevolg had dat de strings links werden uitgelijnd.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Houd er rekening mee dat dit anders is dan de <strong>TRIM-<\/strong> functie in SAS, die kan worden gebruikt om voorloopspaties volledig uit tekenreeksen te verwijderen.<\/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 taken in SAS kunt uitvoeren:<\/span><\/p>\n<p> <a href=\"https:\/\/statorials.org\/nl\/zonder-kommas-uit-de-tekenreeks-te-verwijderen\/\" target=\"_blank\" rel=\"noopener\">SAS: komma&#8217;s uit een tekenreeks verwijderen<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/vervangende-ketting-voor-luchtsluis\/\" target=\"_blank\" rel=\"noopener\">SAS: tekens in een string vervangen<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/verwijder-geen-speciale-tekens\/\" target=\"_blank\" rel=\"noopener\">SAS: Hoe speciale tekens uit tekenreeksen te verwijderen<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>U kunt de LEFT- functie in SAS gebruiken om tekenreeksen links uit te lijnen. De LEFT- functie verplaatst alle voorafgaande spaties naar het einde van de string, wat tot gevolg heeft dat de tekst links wordt uitgelijnd zonder dat de lengte van de string daadwerkelijk verandert. Het volgende voorbeeld laat zien hoe u de LINKS- [&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-4622","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 LINKS-functie in SAS te gebruiken (met voorbeeld) - Statorials<\/title>\n<meta name=\"description\" content=\"In deze zelfstudie wordt aan de hand van een voorbeeld uitgelegd hoe u de functie LEFT in SAS gebruikt om tekenvariabelen links uit te lijnen.\" \/>\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\/linker-functie-luchtsluis\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hoe de LINKS-functie in SAS te gebruiken (met voorbeeld) - Statorials\" \/>\n<meta property=\"og:description\" content=\"In deze zelfstudie wordt aan de hand van een voorbeeld uitgelegd hoe u de functie LEFT in SAS gebruikt om tekenvariabelen links uit te lijnen.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/nl\/linker-functie-luchtsluis\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-09T13:47:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/lf11.png\" \/>\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\/linker-functie-luchtsluis\/\",\"url\":\"https:\/\/statorials.org\/nl\/linker-functie-luchtsluis\/\",\"name\":\"Hoe de LINKS-functie in SAS te gebruiken (met voorbeeld) - Statorials\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/nl\/#website\"},\"datePublished\":\"2023-07-09T13:47:28+00:00\",\"dateModified\":\"2023-07-09T13:47:28+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219\"},\"description\":\"In deze zelfstudie wordt aan de hand van een voorbeeld uitgelegd hoe u de functie LEFT in SAS gebruikt om tekenvariabelen links uit te lijnen.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/nl\/linker-functie-luchtsluis\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/nl\/linker-functie-luchtsluis\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/nl\/linker-functie-luchtsluis\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Thuis\",\"item\":\"https:\/\/statorials.org\/nl\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hoe de links-functie in sas te gebruiken (met voorbeeld)\"}]},{\"@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 LINKS-functie in SAS te gebruiken (met voorbeeld) - Statorials","description":"In deze zelfstudie wordt aan de hand van een voorbeeld uitgelegd hoe u de functie LEFT in SAS gebruikt om tekenvariabelen links uit te lijnen.","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\/linker-functie-luchtsluis\/","og_locale":"de_DE","og_type":"article","og_title":"Hoe de LINKS-functie in SAS te gebruiken (met voorbeeld) - Statorials","og_description":"In deze zelfstudie wordt aan de hand van een voorbeeld uitgelegd hoe u de functie LEFT in SAS gebruikt om tekenvariabelen links uit te lijnen.","og_url":"https:\/\/statorials.org\/nl\/linker-functie-luchtsluis\/","og_site_name":"Statorials","article_published_time":"2023-07-09T13:47:28+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/lf11.png"}],"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\/linker-functie-luchtsluis\/","url":"https:\/\/statorials.org\/nl\/linker-functie-luchtsluis\/","name":"Hoe de LINKS-functie in SAS te gebruiken (met voorbeeld) - Statorials","isPartOf":{"@id":"https:\/\/statorials.org\/nl\/#website"},"datePublished":"2023-07-09T13:47:28+00:00","dateModified":"2023-07-09T13:47:28+00:00","author":{"@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219"},"description":"In deze zelfstudie wordt aan de hand van een voorbeeld uitgelegd hoe u de functie LEFT in SAS gebruikt om tekenvariabelen links uit te lijnen.","breadcrumb":{"@id":"https:\/\/statorials.org\/nl\/linker-functie-luchtsluis\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/nl\/linker-functie-luchtsluis\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/nl\/linker-functie-luchtsluis\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Thuis","item":"https:\/\/statorials.org\/nl\/"},{"@type":"ListItem","position":2,"name":"Hoe de links-functie in sas te gebruiken (met voorbeeld)"}]},{"@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\/4622","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=4622"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts\/4622\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/media?parent=4622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/categories?post=4622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/tags?post=4622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}