{"id":3085,"date":"2023-07-19T07:08:41","date_gmt":"2023-07-19T07:08:41","guid":{"rendered":"https:\/\/statorials.org\/pt\/r-atingiu-getoption-max-print\/"},"modified":"2023-07-19T07:08:41","modified_gmt":"2023-07-19T07:08:41","slug":"r-atingiu-getoption-max-print","status":"publish","type":"post","link":"https:\/\/statorials.org\/pt\/r-atingiu-getoption-max-print\/","title":{"rendered":"Como evitar o aviso r: alcan\u00e7ado getoption(\u201cmax.print\u201d)"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">Uma mensagem de aviso que voc\u00ea pode encontrar no R \u00e9:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong>[ reached getOption(\"max.print\") -- omitted 502 rows ]\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">Esta mensagem aparece quando voc\u00ea tenta imprimir mais de 1000 valores por vez no RStudio.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Por padr\u00e3o, o RStudio permite imprimir apenas 1.000 valores por vez. No entanto, voc\u00ea pode aumentar facilmente esse limite usando um dos seguintes m\u00e9todos:<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>M\u00e9todo 1: aumentar o limite para um valor espec\u00edfico<\/strong><\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#increase print limit to 2000 values<\/span>\noptions( <span style=\"color: #3366ff;\">max.print<\/span> = <span style=\"color: #008000;\">2000<\/span> )<\/strong><\/span><\/pre>\n<p> <span style=\"color: #000000;\"><strong>M\u00e9todo 2: Aumentar o limite para o valor m\u00e1ximo permitido pela m\u00e1quina<\/strong><\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#increase print limit to max allowed by your machine<\/span>\noptions(max. <span style=\"color: #3366ff;\">print<\/span> = .Machine$integer. <span style=\"color: #3366ff;\">max<\/span> )\n<\/strong><\/span><\/pre>\n<p> <span style=\"color: #000000;\">O exemplo a seguir mostra como usar esses m\u00e9todos na pr\u00e1tica.<\/span><\/p>\n<h3> <strong>Exemplo: aumentar o limite de impress\u00e3o em R<\/strong><\/h3>\n<p> <span style=\"color: #000000;\"><span style=\"color: #000000;\">Suponha que criemos um quadro de dados em R com 1.002 linhas e 2 colunas:<\/span><\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#make this example reproducible\n<span style=\"color: #000000;\">set. <span style=\"color: #3366ff;\">seeds<\/span> (0)<\/span>\n\n#create data frame\n<span style=\"color: #000000;\">df &lt;- data. <span style=\"color: #3366ff;\">frame<\/span> (x=runif(1002),\n                 y=runif(1002))<\/span>\n\n#view head of data frame\n<span style=\"color: #000000;\">head(df)\n\n          xy\n1 0.8966972 0.68486090\n2 0.2655087 0.38328339\n3 0.3721239 0.95498800\n4 0.5728534 0.11835658\n5 0.9082078 0.03910006\n6 0.2016819 0.50450503\n<\/span><\/span><\/strong><\/span><\/pre>\n<p> <span style=\"color: #000000;\">A seguir, suponha que tentamos imprimir todo o quadro de dados no RStudio:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#attempt to print entire data frame\n<span style=\"color: #000000;\">df\n<\/span><\/span><\/strong><\/span><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-26395 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/limite-dimpression1.jpg\" alt=\"\" width=\"668\" height=\"385\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">S\u00f3 podemos exibir as primeiras 500 linhas (ou seja, os primeiros 1000 valores) e recebemos um aviso de que 502 linhas foram omitidas.<\/span><\/p>\n<p> <span style=\"color: #000000;\">No entanto, se usarmos a fun\u00e7\u00e3o <strong>max.print<\/strong> , podemos aumentar o limite de impress\u00e3o para 2.500 valores:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#increase print limit to 2500 values<\/span>\noptions( <span style=\"color: #3366ff;\">max.print<\/span> = <span style=\"color: #008000;\">2500<\/span> )\n\n<span style=\"color: #008080;\">#attempt to print entire data frame again<\/span>\ndf\n<\/strong><\/span><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-26396 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/limite-dimpression2.jpg\" alt=\"\" width=\"615\" height=\"428\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">Desta vez conseguimos imprimir todas as 1002 linhas do quadro de dados e n\u00e3o recebemos nenhuma mensagem de aviso, pois aumentamos o limite de impress\u00e3o.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Se quisermos ir ao extremo e definir o limite de impress\u00e3o para o n\u00famero m\u00e1ximo de valores permitidos pela nossa m\u00e1quina, podemos usar a seguinte sintaxe:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#increase print limit to max allowed by your machine<\/span>\noptions(max. <span style=\"color: #3366ff;\">print<\/span> = .Machine$integer. <span style=\"color: #3366ff;\">max<\/span> )<\/strong><\/span><\/pre>\n<p> <span style=\"color: #000000;\">No entanto, use esta op\u00e7\u00e3o apenas se for absolutamente necess\u00e1rio exibir todas as linhas do seu quadro de dados, pois pode levar muito tempo para ser conclu\u00eddo se os dados com os quais voc\u00ea est\u00e1 trabalhando forem extremamente grandes.<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Recursos adicionais<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">Os tutoriais a seguir explicam como resolver outros erros comuns em R:<\/span><\/p>\n<p> <a href=\"https:\/\/statorials.org\/pt\/erro-rbind-em-nomes-r-nao-correspondem-aos-nomes-anteriores\/\" target=\"_blank\" rel=\"noopener\">Como corrigir em R: os nomes n\u00e3o correspondem aos nomes anteriores<\/a><br \/> <a href=\"https:\/\/statorials.org\/pt\">Como corrigir em R: o comprimento de um objeto mais longo n\u00e3o \u00e9 m\u00faltiplo do comprimento de um objeto mais curto<\/a><br \/> <a href=\"https:\/\/statorials.org\/pt\/contrastes-aplicados-a-fatores-com-2-ou-mais-niveis\/\" target=\"_blank\" rel=\"noopener\">Como corrigir em R: contrastes s\u00f3 podem ser aplicados a fatores com 2 ou mais n\u00edveis<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Uma mensagem de aviso que voc\u00ea pode encontrar no R \u00e9: [ reached getOption(&#8220;max.print&#8221;) &#8212; omitted 502 rows ] Esta mensagem aparece quando voc\u00ea tenta imprimir mais de 1000 valores por vez no RStudio. Por padr\u00e3o, o RStudio permite imprimir apenas 1.000 valores por vez. No entanto, voc\u00ea pode aumentar facilmente esse limite usando um [&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-3085","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>Como evitar o aviso R: atingiu getOption(&quot;max.print&quot;) - Estatologia<\/title>\n<meta name=\"description\" content=\"Este tutorial explica como evitar o seguinte aviso em R: alcan\u00e7ado getOption(&quot;max.print&quot;).\" \/>\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\/r-atingiu-getoption-max-print\/\" \/>\n<meta property=\"og:locale\" content=\"pt_PT\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Como evitar o aviso R: atingiu getOption(&quot;max.print&quot;) - Estatologia\" \/>\n<meta property=\"og:description\" content=\"Este tutorial explica como evitar o seguinte aviso em R: alcan\u00e7ado getOption(&quot;max.print&quot;).\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/pt\/r-atingiu-getoption-max-print\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-19T07:08:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/limite-dimpression1.jpg\" \/>\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\/r-atingiu-getoption-max-print\/\",\"url\":\"https:\/\/statorials.org\/pt\/r-atingiu-getoption-max-print\/\",\"name\":\"Como evitar o aviso R: atingiu getOption(&quot;max.print&quot;) - Estatologia\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/pt\/#website\"},\"datePublished\":\"2023-07-19T07:08:41+00:00\",\"dateModified\":\"2023-07-19T07:08:41+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/pt\/#\/schema\/person\/e08f98e8db95e0aa9c310e1b27c9c666\"},\"description\":\"Este tutorial explica como evitar o seguinte aviso em R: alcan\u00e7ado getOption(&quot;max.print&quot;).\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/pt\/r-atingiu-getoption-max-print\/#breadcrumb\"},\"inLanguage\":\"pt-PT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/pt\/r-atingiu-getoption-max-print\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/pt\/r-atingiu-getoption-max-print\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Lar\",\"item\":\"https:\/\/statorials.org\/pt\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Como evitar o aviso r: alcan\u00e7ado getoption(\u201cmax.print\u201d)\"}]},{\"@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":"Como evitar o aviso R: atingiu getOption(&quot;max.print&quot;) - Estatologia","description":"Este tutorial explica como evitar o seguinte aviso em R: alcan\u00e7ado getOption(&quot;max.print&quot;).","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\/r-atingiu-getoption-max-print\/","og_locale":"pt_PT","og_type":"article","og_title":"Como evitar o aviso R: atingiu getOption(&quot;max.print&quot;) - Estatologia","og_description":"Este tutorial explica como evitar o seguinte aviso em R: alcan\u00e7ado getOption(&quot;max.print&quot;).","og_url":"https:\/\/statorials.org\/pt\/r-atingiu-getoption-max-print\/","og_site_name":"Statorials","article_published_time":"2023-07-19T07:08:41+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/limite-dimpression1.jpg"}],"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\/r-atingiu-getoption-max-print\/","url":"https:\/\/statorials.org\/pt\/r-atingiu-getoption-max-print\/","name":"Como evitar o aviso R: atingiu getOption(&quot;max.print&quot;) - Estatologia","isPartOf":{"@id":"https:\/\/statorials.org\/pt\/#website"},"datePublished":"2023-07-19T07:08:41+00:00","dateModified":"2023-07-19T07:08:41+00:00","author":{"@id":"https:\/\/statorials.org\/pt\/#\/schema\/person\/e08f98e8db95e0aa9c310e1b27c9c666"},"description":"Este tutorial explica como evitar o seguinte aviso em R: alcan\u00e7ado getOption(&quot;max.print&quot;).","breadcrumb":{"@id":"https:\/\/statorials.org\/pt\/r-atingiu-getoption-max-print\/#breadcrumb"},"inLanguage":"pt-PT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/pt\/r-atingiu-getoption-max-print\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/pt\/r-atingiu-getoption-max-print\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Lar","item":"https:\/\/statorials.org\/pt\/"},{"@type":"ListItem","position":2,"name":"Como evitar o aviso r: alcan\u00e7ado getoption(\u201cmax.print\u201d)"}]},{"@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\/3085","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=3085"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/posts\/3085\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/media?parent=3085"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/categories?post=3085"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/tags?post=3085"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}