\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{luannekarolyne} \pdfinfo{ /Title (r-cheat-sheet.pdf) /Creator (Cheatography) /Author (luannekarolyne) /Subject (R Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{089EA3} \definecolor{LightBackground}{HTML}{EFF8F9} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{R Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{luannekarolyne} via \textcolor{DarkBackground}{\uline{cheatography.com/216499/cs/47317/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}luannekarolyne \\ \uline{cheatography.com/luannekarolyne} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 24th November, 2025.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{x{2.04057 cm} x{2.93643 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Funções úteis}} \tn % Row 0 \SetRowColor{LightBackground} getwd() & Mostra o diretório de trabalho \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} setwd() & Define o diretório de trabalho \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} str() & Estrutura do objeto \tn % Row Count 5 (+ 1) % Row 3 \SetRowColor{white} ls() & Lista os objetos ativos \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} ls.str() & Detalhes dos objetos ativos \tn % Row Count 8 (+ 2) % Row 5 \SetRowColor{white} rm() & Remove o objeto \tn % Row Count 9 (+ 1) % Row 6 \SetRowColor{LightBackground} rm(list=ls()) & Remove todos os objetos ativos \tn % Row Count 11 (+ 2) % Row 7 \SetRowColor{white} exists() & Verifica a existência de um objeto \tn % Row Count 13 (+ 2) % Row 8 \SetRowColor{LightBackground} help.start() & Abre a função de ajuda \tn % Row Count 15 (+ 2) % Row 9 \SetRowColor{white} \seqsplit{install.packages("")} & Instala os pacotes \tn % Row Count 17 (+ 2) % Row 10 \SetRowColor{LightBackground} library() & Ativa o pacote \tn % Row Count 18 (+ 1) % Row 11 \SetRowColor{white} citation() & Sugestão de como citar o programa R \tn % Row Count 20 (+ 2) % Row 12 \SetRowColor{LightBackground} history() & Lista das funções executadas \tn % Row Count 22 (+ 2) % Row 13 \SetRowColor{white} sessionInfo() & Exibe informações sobre o R e o sistema operacional \tn % Row Count 25 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.9954 cm} x{3.9816 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Operadores}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{{\bf{Aritméticos}}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} + & Adição \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} - & Subtração \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} * & Multiplicação \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} / & Divisão \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} \textasciicircum{} & Potência \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} ** & Potência \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} \%\% & Restante da divisão \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} \%/\% & Divisão inteira \tn % Row Count 9 (+ 1) % Row 9 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{{\bf{Comparações}}} \tn % Row Count 10 (+ 1) % Row 10 \SetRowColor{LightBackground} \textgreater{} & Maior que \tn % Row Count 11 (+ 1) % Row 11 \SetRowColor{white} \textless{} & Menor que \tn % Row Count 12 (+ 1) % Row 12 \SetRowColor{LightBackground} \textgreater{}= & Maior ou igual \tn % Row Count 13 (+ 1) % Row 13 \SetRowColor{white} \textless{}= & Menor ou igual \tn % Row Count 14 (+ 1) % Row 14 \SetRowColor{LightBackground} == & Igual a \tn % Row Count 15 (+ 1) % Row 15 \SetRowColor{white} != & Diferente \tn % Row Count 16 (+ 1) % Row 16 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{{\bf{Lógicos}}} \tn % Row Count 17 (+ 1) % Row 17 \SetRowColor{white} ! & NÃO \tn % Row Count 18 (+ 1) % Row 18 \SetRowColor{LightBackground} x \& y & x E y (vetorizado) \tn % Row Count 19 (+ 1) % Row 19 \SetRowColor{white} x \&\& y & x E y (não vetorizado) \tn % Row Count 20 (+ 1) % Row 20 \SetRowColor{LightBackground} x | y & x OU y (vetorizado) \tn % Row Count 21 (+ 1) % Row 21 \SetRowColor{white} x || y & x OU y (não vetorizado) \tn % Row Count 22 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.89126 cm} x{3.08574 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Funções matemáticas}} \tn % Row 0 \SetRowColor{LightBackground} abs() & Valor absoluto \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} choose() & Combinação \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} exp() & Exponencial \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} factorial() & Fatorial \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} lfactorial() & Log fatorial \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} log() & Logaritmo \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} log2() & Logaritmo de base 2 \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} log10() & Logaritmo de base 10 \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} sqrt() & Raiz quadrada \tn % Row Count 9 (+ 1) % Row 9 \SetRowColor{white} pi & 3,14159... \tn % Row Count 10 (+ 1) % Row 10 \SetRowColor{LightBackground} Inf & Infinito \tn % Row Count 11 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.04057 cm} x{2.93643 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Vetores}} \tn % Row 0 \SetRowColor{LightBackground} num \textless{}- c(6,3,6,0) & Numéricos \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} chr \textless{}- c("flor","azul") & Caracteres \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} logi \textless{}- c(TRUE, TRUE, FALSE) & Lógicos \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} is.vector(var) & Retorna se é um vetor (TRUE) ou não (FALSE) \tn % Row Count 8 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.43873 cm} x{2.53827 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Matrizes}} \tn % Row 0 \SetRowColor{LightBackground} dim(x) & Dimensão da matriz x \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} x{[}1,1{]} & Retorna a linha 1 e coluna 1 \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} x{[}1,{]} & Retorna a linha 1 da matriz \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} x{[},1{]} & Retorna a coluna 1 da matriz \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} nrow(x) & Número de linhas da matriz \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} ncol(x) & Número de colunas da matriz \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} t(x) & Transposta da matriz \tn % Row Count 13 (+ 1) % Row 7 \SetRowColor{white} solve(x) & Inversa da matriz \tn % Row Count 14 (+ 1) % Row 8 \SetRowColor{LightBackground} det(x) & Determinante da matriz \tn % Row Count 16 (+ 2) % Row 9 \SetRowColor{white} diag(x) & Elementos da diagonal da matriz \tn % Row Count 18 (+ 2) % Row 10 \SetRowColor{LightBackground} is.matrix(x) & Verifica se é uma matriz (TRUE) ou não (FALSE) \tn % Row Count 21 (+ 3) % Row 11 \SetRowColor{white} rownames(x) \textless{}- c("nome 1", "nome 2") & Define os nomes das linhas \tn % Row Count 23 (+ 2) % Row 12 \SetRowColor{LightBackground} colnames(x) \textless{}- c("col 1", "col 2") & Define os nomes das colunas \tn % Row Count 25 (+ 2) % Row 13 \SetRowColor{white} attributes(x) & Dimensão e nomes das linhas e colunas \tn % Row Count 27 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.29402 cm} x{3.68298 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Fatores}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{factor(var)} & Converte a variável em fator \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{as.factor(var)} & Converte a variável em fator \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \seqsplit{is.factor(var)} & Verifica se é um fator (TRUE) ou não (FALSE) \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} levels() & Retorna os níveis do fator \tn % Row Count 7 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.09034 cm} x{2.88666 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Funções gerais}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{{\bf{Controle das variáveis}}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} ifelse() & Condição para um vetor inteiro \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} if (condicao) \{\} else \{\} & Escolhe um dos caminhos definidos \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} stop() & Interrompe a execução \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{{\bf{Criação de funções}}} \tn % Row Count 7 (+ 1) % Row 5 \SetRowColor{white} function() & Executa uma ação \tn % Row Count 8 (+ 1) % Row 6 \SetRowColor{LightBackground} return() & Retorna a ação \tn % Row Count 9 (+ 1) % Row 7 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{{\bf{Descritiva dos dados}}} \tn % Row Count 10 (+ 1) % Row 8 \SetRowColor{LightBackground} attach() & Acessar as colunas \tn % Row Count 11 (+ 1) % Row 9 \SetRowColor{white} table() & Frequência absoluta \tn % Row Count 12 (+ 1) % Row 10 \SetRowColor{LightBackground} prop.table() & Frequências relativas \tn % Row Count 13 (+ 1) % Row 11 \SetRowColor{white} aggregate() & Resumo por grupos \tn % Row Count 14 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.44333 cm} x{3.53367 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Valores faltantes}} \tn % Row 0 \SetRowColor{LightBackground} is.na() & indica quais elementos estão faltando \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} !is.na() & indica quais elementos não estão faltando \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} anyNA() & Se houver algum valor faltante retorna TRUE \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} y{[}is.na(y){]} \textless{}- x & Substitui todos os valores faltantes em y por x \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} na.omit() & Remove linhas que contém valores faltantes (NA) \tn % Row Count 10 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.14011 cm} x{2.83689 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Parâmetros gráficos}} \tn % Row 0 \SetRowColor{LightBackground} par() & Ajusta os parâmetros gráficos \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} bty= & Define a moldura ao redor do gráfico \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} las= & Orientação dos textos dos eixos \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} lty= & Especifica o padrão das linhas \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} lwd= & Espessura das linhas \tn % Row Count 9 (+ 1) % Row 5 \SetRowColor{white} mar= & Margens do gráfico \tn % Row Count 10 (+ 1) % Row 6 \SetRowColor{LightBackground} pch= & Tipo de símbolo dos pontos \tn % Row Count 12 (+ 2) % Row 7 \SetRowColor{white} col.axis / col.lab / col.main & Modifica as cores nos eixos e título \tn % Row Count 14 (+ 2) % Row 8 \SetRowColor{LightBackground} cex.axis / cex.lab / cex.main & Modifica o tamanho dos eixos e título \tn % Row Count 16 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.14011 cm} x{2.83689 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Funções mais utilizadas - Tidyverse}} \tn % Row 0 \SetRowColor{LightBackground} mutate() & Criar/transformar colunas \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} filter() & Filtrar linhas \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} select() & Selecionar \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} rename() & renomear colunas \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} group\_by() & Agrupar variáveis \tn % Row Count 6 (+ 1) % Row 5 \SetRowColor{white} summarise() & Agregar valores \tn % Row Count 7 (+ 1) % Row 6 \SetRowColor{LightBackground} left\_join() & Combinar bases \tn % Row Count 8 (+ 1) % Row 7 \SetRowColor{white} pivot\_longer() / pivot\_wider() & Transformar formato wide ↔ long \tn % Row Count 10 (+ 2) % Row 8 \SetRowColor{LightBackground} across() & Aplicar funções sobre várias colunas \tn % Row Count 12 (+ 2) % Row 9 \SetRowColor{white} str\_extract() & Extrair padrões \tn % Row Count 13 (+ 1) % Row 10 \SetRowColor{LightBackground} str\_trim() & Ajustar espaços \tn % Row Count 14 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.14011 cm} x{2.83689 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Funções para construção de mapas}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{geobr::read\_municipality()} & Carrega malha municipal brasileira \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} st\_as\_sf() & Transforma para objeto sf \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} st\_make\_valid() & Conserta geometrias quebradas \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \seqsplit{st\_point\_on\_surface()} & Gera um ponto dentro do polígono \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} st\_coordinates() & Extrai latitude/longitude \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} tm\_shape() & Criar mapas temáticos \tn % Row Count 11 (+ 1) % Row 6 \SetRowColor{LightBackground} tm\_polygons() & Criar mapas temáticos \tn % Row Count 12 (+ 1) % Row 7 \SetRowColor{white} tmap\_save() & Salvar mapas \tn % Row Count 13 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.09494 cm} x{3.88206 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Medidas descritivas}} \tn % Row 0 \SetRowColor{LightBackground} mean() & Média dos valores do objeto \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} sd() & Desvio padrão \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} var() & Variância \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \seqsplit{median()} & Mediana \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} range() & Amplitude (mínimo e máximo dos dados) \tn % Row Count 6 (+ 2) % Row 5 \SetRowColor{white} min() & Valor mínimo \tn % Row Count 7 (+ 1) % Row 6 \SetRowColor{LightBackground} max() & Valor máximo \tn % Row Count 8 (+ 1) % Row 7 \SetRowColor{white} \seqsplit{quantile()} & Calcula os quantis amostrais \tn % Row Count 10 (+ 2) % Row 8 \SetRowColor{LightBackground} IQR() & Amplitude do intervalo interquartil \tn % Row Count 12 (+ 2) % Row 9 \SetRowColor{white} sum() & Soma \tn % Row Count 13 (+ 1) % Row 10 \SetRowColor{LightBackground} prod() & Calcula o produto \tn % Row Count 14 (+ 1) % Row 11 \SetRowColor{white} sort() & Ordena os elementos \tn % Row Count 15 (+ 1) % Row 12 \SetRowColor{LightBackground} \seqsplit{summary()} & Resumo das descritivas do objeto \tn % Row Count 17 (+ 2) % Row 13 \SetRowColor{white} \seqsplit{which.min()} & Posição do valor mínimo \tn % Row Count 19 (+ 2) % Row 14 \SetRowColor{LightBackground} \seqsplit{which.max()} & Posição do valor máximo \tn % Row Count 21 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.18988 cm} x{2.78712 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Testes estatísticos}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{{\bf{Correlação}}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} cor.test(..., \seqsplit{method="pearson")} & Correlação de Pearson (paramétrica) \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} cor.test(..., \seqsplit{method="spearman")} & Correlação de Spearman (não paramétrica) \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} cor.test(..., \seqsplit{method="kendall")} & Correlação de Kendall (não paramétrica) \tn % Row Count 7 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{{\bf{Comparação de variâncias}}} \tn % Row Count 8 (+ 1) % Row 5 \SetRowColor{white} var.test(x,y) & Teste F (duas variâncias) \tn % Row Count 10 (+ 2) % Row 6 \SetRowColor{LightBackground} bartlett.test() & Teste de Bartlett (homogeneidade - normalidade exigida) \tn % Row Count 13 (+ 3) % Row 7 \SetRowColor{white} leveneTest() & Teste de Levene (homogeneidade) \tn % Row Count 15 (+ 2) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{{\bf{Comparação de médias}}} \tn % Row Count 16 (+ 1) % Row 9 \SetRowColor{white} t.test() & Teste T (comparação de médias) \tn % Row Count 18 (+ 2) % Row 10 \SetRowColor{LightBackground} t.test(x, y, var.equal = TRUE) & Variâncias iguais (Teste T) \tn % Row Count 20 (+ 2) % Row 11 \SetRowColor{white} t.test(x, y, paired = TRUE) & Teste T pareado \tn % Row Count 22 (+ 2) % Row 12 \SetRowColor{LightBackground} aov() / anova() & ANOVA \tn % Row Count 23 (+ 1) % Row 13 \SetRowColor{white} TukeyHSD() & Pós-hoc Tukey \tn % Row Count 24 (+ 1) % Row 14 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{{\bf{Testes não paramétricos}}} \tn % Row Count 25 (+ 1) % Row 15 \SetRowColor{white} wilcox.test() & Teste U de Mann-Whitney \tn % Row Count 27 (+ 2) % Row 16 \SetRowColor{LightBackground} kruskal.test() & Teste de Kruskal–Wallis \tn % Row Count 29 (+ 2) % Row 17 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{{\bf{Testes de significância}}} \tn % Row Count 30 (+ 1) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.18988 cm} x{2.78712 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Testes estatísticos (cont)}} \tn % Row 18 \SetRowColor{LightBackground} chisq.test() & Teste qui-quadrado de Pearson \tn % Row Count 2 (+ 2) % Row 19 \SetRowColor{white} fisher.test() & Teste exato de Fisher \tn % Row Count 3 (+ 1) % Row 20 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{{\bf{Testes de normalidade}}} \tn % Row Count 4 (+ 1) % Row 21 \SetRowColor{white} shapiro.test() & Shapiro–Wilk \tn % Row Count 5 (+ 1) % Row 22 \SetRowColor{LightBackground} ks.test() & Kolmogorov–Smirnov \tn % Row Count 6 (+ 1) % Row 23 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{{\bf{Teste para séries temporais}}} \tn % Row Count 7 (+ 1) % Row 24 \SetRowColor{LightBackground} adf.test() & Dickey-Fuller aumentado (ADF) \tn % Row Count 9 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}