{"id":4595,"date":"2023-07-09T19:40:24","date_gmt":"2023-07-09T19:40:24","guid":{"rendered":"https:\/\/statorials.org\/nl\/sas-findc-functie\/"},"modified":"2023-07-09T19:40:24","modified_gmt":"2023-07-09T19:40:24","slug":"sas-findc-functie","status":"publish","type":"post","link":"https:\/\/statorials.org\/nl\/sas-findc-functie\/","title":{"rendered":"Hoe de findc-functie in sas te gebruiken"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">U kunt de functie <b>FINDC<\/b> in SAS gebruiken om de positie te retourneren van de eerste keer dat een afzonderlijk teken in een tekenreeks voorkomt.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Deze functie gebruikt de volgende basissyntaxis:<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>FINDC (string, lijst met tanks)<\/strong><\/span><\/p>\n<p> <span style=\"color: #000000;\">Goud:<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><strong>string<\/strong> : De tekenreeks die moet worden geparseerd<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong>charlist<\/strong> : De lijst met tekens waarnaar in <em>de bron<\/em> moet worden gezocht<\/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 FINDC-functie in SAS<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">Stel dat we de volgende gegevensset in SAS hebben die een kolom met namen bevat:<\/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> name $25.;\n    <span style=\"color: #3366ff;\">datalines<\/span> ;\nAndy Lincoln Bernard\nMichael Smith\nChad Simpson Arnolds\nDerrick Smith Henrys\nEric Millerton Smith\nFrank Giovanni Goode\n;\n<span style=\"color: #800080;\">run<\/span> ;\n\n\/*view dataset*\/\n<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-29929 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/indice1.jpg\" alt=\"\" width=\"210\" height=\"192\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">We kunnen de functie <b>FINDC<\/b> gebruiken om de positie te vinden van de eerste keer dat de tekens <strong>x<\/strong> , <strong>y<\/strong> <em>of<\/em> <strong>z<\/strong> voorkomen:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008000;\">\/*find position of first occurrence of either x, y or z in name*\/\n<\/span><span style=\"color: #800080;\">data<\/span> new_data;\n    <span style=\"color: #3366ff;\">set<\/span> original_data;\n    first_xyz = <span style=\"color: #3366ff;\">findc<\/span> (name, 'xyz');\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<\/strong><\/span><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-35815 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/indexc1.png\" alt=\"\" width=\"290\" height=\"198\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">De nieuwe kolom genaamd <strong>first_xyz<\/strong> geeft de positie weer van de eerste keer dat de tekens <strong>x<\/strong> , <strong>y<\/strong> <em>of<\/em> <strong>z<\/strong> voorkomen in de <strong>naamkolom<\/strong> .<\/span><\/p>\n<p> <span style=\"color: #000000;\">Als geen van deze drie tekens in de <strong>naamkolom<\/strong> voorkomt, retourneert de functie <b>FINDC<\/b> eenvoudigweg de waarde <strong>0<\/strong> .<\/span><\/p>\n<p> <span style=\"color: #000000;\">Uit het resultaat kunnen we bijvoorbeeld zien:<\/span><\/p>\n<p> <span style=\"color: #000000;\">De positie van het eerste voorkomen van x, y of z in de eerste rij is positie <strong>4<\/strong> . We kunnen zien dat het teken op positie 4 in de eerste regel a <strong>y<\/strong> is.<\/span><\/p>\n<p> <span style=\"color: #000000;\">De positie van de eerste keer dat x, y of z in de tweede rij voorkomt, is <strong>0<\/strong> , omdat geen van deze drie letters voorkomt in de naam van de tweede rij.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Enzovoort.<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Het verschil tussen de functies FIND en FINDC<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">De functie <b>FIND<\/b> in SAS retourneert de positie van de eerste keer dat een bepaalde subtekenreeks in een andere tekenreeks voorkomt.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Het volgende voorbeeld illustreert het verschil tussen de functies <b>FIND<\/b> en <b>FINDC<\/b> :<\/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> original_data;\n    find_smith = <span style=\"color: #3366ff;\">find<\/span> (name, 'Smith');\n    findc_smith = <span style=\"color: #3366ff;\">findc<\/span> (name, 'Smith');\n<span style=\"color: #800080;\">run<\/span> ;\n\n<span style=\"color: #008000;\">\/*view new dataset*\/\n<\/span><span style=\"color: #800080;\">proc print<\/span> <span style=\"color: #3366ff;\">data<\/span> =new_data;<\/strong><\/span> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-35855 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/trouverc1.png\" alt=\"\" width=\"428\" height=\"218\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">De kolom <strong>find_smith<\/strong> geeft de positie weer van de eerste keer dat de subtekenreeks &#8222;Smith&#8220; voorkomt in de <strong>naamkolom<\/strong> .<\/span><\/p>\n<p> <span style=\"color: #000000;\">De kolom <strong>findc_smith<\/strong> geeft de positie weer van de eerste keer dat de letters <strong>s<\/strong> , <strong>m<\/strong> , <strong>i<\/strong> , <strong>t<\/strong> <em>of<\/em> <strong>h<\/strong> voorkomen in de <strong>naamkolom<\/strong> .<\/span><\/p>\n<p> <span style=\"color: #000000;\">Uit het resultaat kunnen we bijvoorbeeld zien:<\/span><\/p>\n<p> <span style=\"color: #000000;\">De subtekenreeks &#8218;Smith&#8216; komt nooit voor in de voornaam, dus <strong>find_smith<\/strong> retourneert een waarde van <strong>0<\/strong> .<\/span><\/p>\n<p> <span style=\"color: #000000;\">De letter <strong>i<\/strong> verschijnt op de 7e positie van de voornaam, dus <strong>findc_smith<\/strong> retourneert een waarde van <strong>7<\/strong> .<\/span><\/p>\n<p> <span style=\"color: #000000;\">Enzovoort.<\/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\/sas-zoekfunctie\/\" target=\"_blank\" rel=\"noopener\">Hoe de FIND-functie in SAS te gebruiken<\/a><br \/> <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><\/p>\n","protected":false},"excerpt":{"rendered":"<p>U kunt de functie FINDC in SAS gebruiken om de positie te retourneren van de eerste keer dat een afzonderlijk teken in een tekenreeks voorkomt. Deze functie gebruikt de volgende basissyntaxis: FINDC (string, lijst met tanks) Goud: string : De tekenreeks die moet worden geparseerd charlist : De lijst met tekens waarnaar in de bron [&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-4595","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 FINDC-functie in SAS - Statorials te gebruiken<\/title>\n<meta name=\"description\" content=\"In deze zelfstudie wordt aan de hand van een voorbeeld uitgelegd hoe u de FINDC-functie in SAS gebruikt.\" \/>\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\/sas-findc-functie\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hoe de FINDC-functie in SAS - Statorials te gebruiken\" \/>\n<meta property=\"og:description\" content=\"In deze zelfstudie wordt aan de hand van een voorbeeld uitgelegd hoe u de FINDC-functie in SAS gebruikt.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/nl\/sas-findc-functie\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-09T19:40:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/indice1.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\u00a0Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/nl\/sas-findc-functie\/\",\"url\":\"https:\/\/statorials.org\/nl\/sas-findc-functie\/\",\"name\":\"Hoe de FINDC-functie in SAS - Statorials te gebruiken\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/nl\/#website\"},\"datePublished\":\"2023-07-09T19:40:24+00:00\",\"dateModified\":\"2023-07-09T19:40:24+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 FINDC-functie in SAS gebruikt.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/nl\/sas-findc-functie\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/nl\/sas-findc-functie\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/nl\/sas-findc-functie\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Thuis\",\"item\":\"https:\/\/statorials.org\/nl\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hoe de findc-functie in sas te gebruiken\"}]},{\"@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 FINDC-functie in SAS - Statorials te gebruiken","description":"In deze zelfstudie wordt aan de hand van een voorbeeld uitgelegd hoe u de FINDC-functie in SAS gebruikt.","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\/sas-findc-functie\/","og_locale":"de_DE","og_type":"article","og_title":"Hoe de FINDC-functie in SAS - Statorials te gebruiken","og_description":"In deze zelfstudie wordt aan de hand van een voorbeeld uitgelegd hoe u de FINDC-functie in SAS gebruikt.","og_url":"https:\/\/statorials.org\/nl\/sas-findc-functie\/","og_site_name":"Statorials","article_published_time":"2023-07-09T19:40:24+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/indice1.jpg"}],"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\/sas-findc-functie\/","url":"https:\/\/statorials.org\/nl\/sas-findc-functie\/","name":"Hoe de FINDC-functie in SAS - Statorials te gebruiken","isPartOf":{"@id":"https:\/\/statorials.org\/nl\/#website"},"datePublished":"2023-07-09T19:40:24+00:00","dateModified":"2023-07-09T19:40:24+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 FINDC-functie in SAS gebruikt.","breadcrumb":{"@id":"https:\/\/statorials.org\/nl\/sas-findc-functie\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/nl\/sas-findc-functie\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/nl\/sas-findc-functie\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Thuis","item":"https:\/\/statorials.org\/nl\/"},{"@type":"ListItem","position":2,"name":"Hoe de findc-functie in sas te gebruiken"}]},{"@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\/4595","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=4595"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts\/4595\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/media?parent=4595"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/categories?post=4595"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/tags?post=4595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}