{"id":4481,"date":"2023-07-10T18:46:06","date_gmt":"2023-07-10T18:46:06","guid":{"rendered":"https:\/\/statorials.org\/pt\/camara-de-ar-gato-catt-gatos-catx\/"},"modified":"2023-07-10T18:46:06","modified_gmt":"2023-07-10T18:46:06","slug":"camara-de-ar-gato-catt-gatos-catx","status":"publish","type":"post","link":"https:\/\/statorials.org\/pt\/camara-de-ar-gato-catt-gatos-catx\/","title":{"rendered":"Sas: um guia completo para cat, catt, cats e catx"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">Voc\u00ea pode usar as fun\u00e7\u00f5es <strong>CAT<\/strong> , <strong>CATT<\/strong> , <strong>CATS<\/strong> e <strong>CATX<\/strong> para concatenar vari\u00e1veis de string no SAS.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Aqui est\u00e1 a diferen\u00e7a entre as diferentes fun\u00e7\u00f5es:<\/span><\/p>\n<p> <span style=\"color: #000000;\">A fun\u00e7\u00e3o <strong>CAT<\/strong> concatena vari\u00e1veis de string sem remover espa\u00e7os.<\/span><\/p>\n<p> <span style=\"color: #000000;\">A fun\u00e7\u00e3o <strong>CATT<\/strong> remove espa\u00e7os finais de strings e concatena vari\u00e1veis de string.<\/span><\/p>\n<p> <span style=\"color: #000000;\">A fun\u00e7\u00e3o <strong>CATS<\/strong> remove espa\u00e7os iniciais e finais de strings e, em seguida, concatena as vari\u00e1veis de string.<\/span><\/p>\n<p> <span style=\"color: #000000;\">A fun\u00e7\u00e3o <strong>CATX<\/strong> remove espa\u00e7os em branco iniciais e finais de strings e, em seguida, concatena vari\u00e1veis de string com um delimitador personalizado.<\/span><\/p>\n<p> <span style=\"color: #000000;\">O exemplo a seguir mostra como usar cada fun\u00e7\u00e3o na pr\u00e1tica.<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Exemplo: Como usar CAT, CATT, CATS e CATX em SAS<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">Suponha que temos o seguinte conjunto de dados no SAS que cont\u00e9m tr\u00eas vari\u00e1veis de string:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008000;\">\/*create dataset*\/\n<\/span><span style=\"color: #800080;\">data<\/span> my_data;\n<span style=\"color: #3366ff;\">input<\/span> player $ team $ conf $;\n<span style=\"color: #3366ff;\">datalines<\/span> ;\nAndy Mavs West\nBob Lakers West\nChad Nuggets West\nDoug Celtics East  \nEddy Nets East  \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> =my_data;<\/strong><\/span> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-35054 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/chats1.png\" alt=\"\" width=\"219\" height=\"156\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">Agora suponha que queiramos usar as fun\u00e7\u00f5es <strong>CAT<\/strong> , <strong>CATT<\/strong> , <strong>CATS<\/strong> e <strong>CATX<\/strong> para concatenar essas tr\u00eas vari\u00e1veis de string em uma \u00fanica vari\u00e1vel.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Podemos usar o seguinte c\u00f3digo para fazer isso:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008000;\">\/*create new dataset that concatenates columns*\/\n<\/span><span style=\"color: #800080;\">data<\/span> new_data;\n<span style=\"color: #3366ff;\">set<\/span> my_data;\ncat = <span style=\"color: #3366ff;\">cat<\/span> (player, team, conf);\ncatt = <span style=\"color: #3366ff;\">catt<\/span> (player, team, conf);\ncats = <span style=\"color: #3366ff;\">cats<\/span> (player, team, conf);\ncatx = <span style=\"color: #3366ff;\">catx<\/span> (' <span style=\"color: #ff0000;\">-<\/span> ', player, team, conf);\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> =new_data;<\/strong><\/span> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-35055\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/chats2.png\" alt=\"Fun\u00e7\u00f5es SAS CAT CATT CATS e CATX\" width=\"677\" height=\"150\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">Observe que todas as diferentes fun\u00e7\u00f5es de concatena\u00e7\u00e3o concatenam as tr\u00eas vari\u00e1veis de string de maneiras ligeiramente diferentes.<\/span><\/p>\n<p> <span style=\"color: #000000;\">A fun\u00e7\u00e3o <strong>CAT<\/strong> concatenou as tr\u00eas strings e deixou espa\u00e7os entre elas.<\/span><\/p>\n<p> <span style=\"color: #000000;\">A fun\u00e7\u00e3o <strong>CATT<\/strong> removeu todos os espa\u00e7os finais de cada string e depois os concatenou.<\/span><\/p>\n<p> <span style=\"color: #000000;\">A fun\u00e7\u00e3o <strong>CATS<\/strong> removeu os espa\u00e7os iniciais e finais de cada string e depois os concatenou.<\/span><\/p>\n<p> <span style=\"color: #000000;\">A fun\u00e7\u00e3o <strong>CATX<\/strong> removeu os espa\u00e7os iniciais e finais de cada string e os concatenou usando um h\u00edfen ( <strong>&#8211;<\/strong> ) como delimitador.<\/span><\/p>\n<p> <span style=\"color: #000000;\"><span style=\"color: #000000;\">Ao trabalhar com essas fun\u00e7\u00f5es de concatena\u00e7\u00e3o em seus pr\u00f3prios dados, fique \u00e0 vontade para usar aquela que melhor se adapta \u00e0 sua situa\u00e7\u00e3o.<\/span><\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Recursos adicionais<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">Os tutoriais a seguir explicam como executar outras tarefas comuns no SAS:<\/span><\/p>\n<p> <span style=\"color: #000000;\"><a href=\"https:\/\/statorials.org\/pt\/nao-remova-caracteres-especiais\/\" target=\"_blank\" rel=\"noopener\">Como remover caracteres especiais de strings no SAS<\/a><br \/> <a href=\"https:\/\/statorials.org\/pt\/sas-extrair-numero-do-canal\/\" target=\"_blank\" rel=\"noopener\">Como extrair n\u00fameros de uma string no SAS<\/a><br \/> <a href=\"https:\/\/statorials.org\/pt\/sas-maiusculas-minusculas-proprias-maiusculas\/\" target=\"_blank\" rel=\"noopener\">Como converter strings em mai\u00fasculas, min\u00fasculas e mai\u00fasculas no SAS<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Voc\u00ea pode usar as fun\u00e7\u00f5es CAT , CATT , CATS e CATX para concatenar vari\u00e1veis de string no SAS. Aqui est\u00e1 a diferen\u00e7a entre as diferentes fun\u00e7\u00f5es: A fun\u00e7\u00e3o CAT concatena vari\u00e1veis de string sem remover espa\u00e7os. A fun\u00e7\u00e3o CATT remove espa\u00e7os finais de strings e concatena vari\u00e1veis de string. A fun\u00e7\u00e3o CATS remove espa\u00e7os [&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-4481","post","type-post","status-publish","format-standard","hentry","category-guia"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SAS: Um guia completo para CAT, CATT, CATS e CATX - Estatologia<\/title>\n<meta name=\"description\" content=\"Este tutorial fornece um guia completo para as fun\u00e7\u00f5es CAT, CATT, CATS e CATX no SAS, incluindo exemplos.\" \/>\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\/pt\/camara-de-ar-gato-catt-gatos-catx\/\" \/>\n<meta property=\"og:locale\" content=\"pt_PT\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SAS: Um guia completo para CAT, CATT, CATS e CATX - Estatologia\" \/>\n<meta property=\"og:description\" content=\"Este tutorial fornece um guia completo para as fun\u00e7\u00f5es CAT, CATT, CATS e CATX no SAS, incluindo exemplos.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/pt\/camara-de-ar-gato-catt-gatos-catx\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-10T18:46:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/chats1.png\" \/>\n<meta name=\"author\" content=\"Dr. benjamim anderson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dr. benjamim anderson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tempo estimado de leitura\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/pt\/camara-de-ar-gato-catt-gatos-catx\/\",\"url\":\"https:\/\/statorials.org\/pt\/camara-de-ar-gato-catt-gatos-catx\/\",\"name\":\"SAS: Um guia completo para CAT, CATT, CATS e CATX - Estatologia\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/pt\/#website\"},\"datePublished\":\"2023-07-10T18:46:06+00:00\",\"dateModified\":\"2023-07-10T18:46:06+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/pt\/#\/schema\/person\/e08f98e8db95e0aa9c310e1b27c9c666\"},\"description\":\"Este tutorial fornece um guia completo para as fun\u00e7\u00f5es CAT, CATT, CATS e CATX no SAS, incluindo exemplos.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/pt\/camara-de-ar-gato-catt-gatos-catx\/#breadcrumb\"},\"inLanguage\":\"pt-PT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/pt\/camara-de-ar-gato-catt-gatos-catx\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/pt\/camara-de-ar-gato-catt-gatos-catx\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Lar\",\"item\":\"https:\/\/statorials.org\/pt\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Sas: um guia completo para cat, catt, cats e catx\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/pt\/#website\",\"url\":\"https:\/\/statorials.org\/pt\/\",\"name\":\"Statorials\",\"description\":\"O seu guia para a literacia estat\u00edstica!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/pt\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"pt-PT\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/pt\/#\/schema\/person\/e08f98e8db95e0aa9c310e1b27c9c666\",\"name\":\"Dr. benjamim anderson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-PT\",\"@id\":\"https:\/\/statorials.org\/pt\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/statorials.org\/pt\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"https:\/\/statorials.org\/pt\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"caption\":\"Dr. benjamim anderson\"},\"description\":\"Ol\u00e1, sou Benjamin, um professor aposentado de estat\u00edstica que se tornou professor dedicado na Statorials. Com vasta experi\u00eancia e conhecimento na \u00e1rea de estat\u00edstica, estou empenhado em compartilhar meu conhecimento para capacitar os alunos por meio de Statorials. Saber mais\",\"sameAs\":[\"https:\/\/statorials.org\/pt\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SAS: Um guia completo para CAT, CATT, CATS e CATX - Estatologia","description":"Este tutorial fornece um guia completo para as fun\u00e7\u00f5es CAT, CATT, CATS e CATX no SAS, incluindo exemplos.","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\/pt\/camara-de-ar-gato-catt-gatos-catx\/","og_locale":"pt_PT","og_type":"article","og_title":"SAS: Um guia completo para CAT, CATT, CATS e CATX - Estatologia","og_description":"Este tutorial fornece um guia completo para as fun\u00e7\u00f5es CAT, CATT, CATS e CATX no SAS, incluindo exemplos.","og_url":"https:\/\/statorials.org\/pt\/camara-de-ar-gato-catt-gatos-catx\/","og_site_name":"Statorials","article_published_time":"2023-07-10T18:46:06+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/chats1.png"}],"author":"Dr. benjamim anderson","twitter_card":"summary_large_image","twitter_misc":{"Escrito por":"Dr. benjamim anderson","Tempo estimado de leitura":"2 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/pt\/camara-de-ar-gato-catt-gatos-catx\/","url":"https:\/\/statorials.org\/pt\/camara-de-ar-gato-catt-gatos-catx\/","name":"SAS: Um guia completo para CAT, CATT, CATS e CATX - Estatologia","isPartOf":{"@id":"https:\/\/statorials.org\/pt\/#website"},"datePublished":"2023-07-10T18:46:06+00:00","dateModified":"2023-07-10T18:46:06+00:00","author":{"@id":"https:\/\/statorials.org\/pt\/#\/schema\/person\/e08f98e8db95e0aa9c310e1b27c9c666"},"description":"Este tutorial fornece um guia completo para as fun\u00e7\u00f5es CAT, CATT, CATS e CATX no SAS, incluindo exemplos.","breadcrumb":{"@id":"https:\/\/statorials.org\/pt\/camara-de-ar-gato-catt-gatos-catx\/#breadcrumb"},"inLanguage":"pt-PT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/pt\/camara-de-ar-gato-catt-gatos-catx\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/pt\/camara-de-ar-gato-catt-gatos-catx\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Lar","item":"https:\/\/statorials.org\/pt\/"},{"@type":"ListItem","position":2,"name":"Sas: um guia completo para cat, catt, cats e catx"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/pt\/#website","url":"https:\/\/statorials.org\/pt\/","name":"Statorials","description":"O seu guia para a literacia estat\u00edstica!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/pt\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"pt-PT"},{"@type":"Person","@id":"https:\/\/statorials.org\/pt\/#\/schema\/person\/e08f98e8db95e0aa9c310e1b27c9c666","name":"Dr. benjamim anderson","image":{"@type":"ImageObject","inLanguage":"pt-PT","@id":"https:\/\/statorials.org\/pt\/#\/schema\/person\/image\/","url":"https:\/\/statorials.org\/pt\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","contentUrl":"https:\/\/statorials.org\/pt\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","caption":"Dr. benjamim anderson"},"description":"Ol\u00e1, sou Benjamin, um professor aposentado de estat\u00edstica que se tornou professor dedicado na Statorials. Com vasta experi\u00eancia e conhecimento na \u00e1rea de estat\u00edstica, estou empenhado em compartilhar meu conhecimento para capacitar os alunos por meio de Statorials. Saber mais","sameAs":["https:\/\/statorials.org\/pt"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/posts\/4481","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/comments?post=4481"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/posts\/4481\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/media?parent=4481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/categories?post=4481"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/tags?post=4481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}