Voltar aos Cursos
AI014 Profissional

Uma Introdução à Programação em R

Este curso é uma introdução abrangente ao ambiente de linguagem R, abrangendo tópicos essenciais desde operações básicas com vetores numéricos, atributos de objetos, processamento de matrizes e arrays, gerenciamento de listas e quadros de dados, até modelagem estatística e produção de gráficos de alta qualidade. É altamente adequado como texto introdutório para análise estatística e ciência de dados.

4.9
30.0h
716 estudantes
10 lessons
2 curtidas
Inteligência Artificial
Começar a Aprender

Visão Geral do Curso

📚 Resumo do Conteúdo

Este curso é uma introdução abrangente ao ambiente de linguagem R, abordando tópicos centrais que vão desde operações básicas com vetores numéricos, atributos de objetos e manipulação de arrays/matrizes até o gerenciamento de listas e quadros de dados, modelagem estatística e produção de gráficos de alta qualidade. É adequado como livro-texto introdutório para análise estatística e ciência de dados.

Domine os fundamentos da linguagem R e abra a porta para computação estatística e visualização de dados.

Autor: Equipe Núcleo de Desenvolvimento do R

Agradecimentos: Este manual é mantido pela Equipe Núcleo de Desenvolvimento do R. A versão em chinês agradece a base da tradução japonesa feita por Shigeru MASE, bem como as contribuições da equipe de tradutores chineses, incluindo os Drs. ZP Li e Rui Li.

🎯 Objetivos de Aprendizagem

  1. Iniciar sessões do R, navegar no sistema de ajuda e aplicar regras básicas de sintaxe (sensibilidade a maiúsculas/minúsculas, atribuições e comentários).
  2. Distinguir entre e criar vetores lógicos, vetores de caracteres e lidar com valores ausentes (NA e NaN).
  3. Utilizar quatro métodos distintos de indexação para selecionar, excluir ou modificar subconjuntos específicos de dados.
  4. Identificar e modificar os atributos intrínsecos (tipo e comprimento) dos objetos do R.
  5. Utilizar as funções class() e attr() para gerenciar metadados de objetos e estruturas de dados.
  6. Criar e manipular fatores e fatores ordenados para representar dados categóricos.
  7. Definir e construir arrays e matrizes usando vetores de dimensão e a função array().
  8. Aplicar técnicas avançadas de indexação, incluindo o uso de matrizes de índice para extrair ou modificar elementos específicos.
  9. Executar operações de álgebra linear, incluindo produtos externos, transposições generalizadas e inversões de matrizes.
  10. Construir e modificar listas: criar listas nomeadas e não nomeadas e combiná-las usando sintaxe específica do R.

Aulas

Lesson

This lesson introduces the R programming environment, focusing on workspace management, the documentation hierarchy, and essential shell commands for project initialization. Students will also learn the fundamentals of R syntax, including the use of the assignment operator, the importance of case sensitivity, and how to utilize built-in examples for troubleshooting.

This lesson explores the fundamental structure of R objects, focusing on atomic vectors as the primary unit of data storage and the importance of homogeneity. Students will learn how to interrogate object properties using diagnostic functions like typeof() and length(), and how to manage data identity through explicit coercion.

This lesson explores the foundations of multi-dimensional data in R, focusing on how arrays are constructed by applying dimension attributes to atomic vectors. Students will learn to perform matrix operations, understand the recycling rule, and utilize k-way arrays to efficiently organize and index large-scale datasets.

This lesson explores advanced data management in R, focusing on the structural differences between homogeneous atomic vectors and heterogeneous lists. Students will learn to organize complex datasets by creating and subsetting lists, manipulating tabular data with data frames, and performing file I/O operations.

This lesson covers the fundamentals of data ingestion and structuring in R, including the use of lists, matrices, and data frames for statistical analysis. It also introduces R’s standardized d-p-q-r prefix system, which provides a unified framework for calculating probability densities, cumulative distributions, quantiles, and random sampling.

This lesson introduces program control in R, focusing on how conditional statements and iterative loops allow scripts to move beyond linear execution to handle dynamic, data-driven logic. Students will learn to implement branching and looping structures to ensure code reliability and achieve predictable outcomes when processing complex datasets.

This lesson explores the transition from manual scripting to automated programming in R by utilizing control flow, vectorized operations, and the apply family of functions. Students will also learn to design custom functions, manage variable scoping, and implement modular code to improve scalability and efficiency.

This lesson explores statistical modeling in R, focusing on the use of data frames, symbolic formula syntax, and polymorphic functions to streamline analysis. Students will learn how to implement linear and non-linear models, perform parameter estimation, and utilize generic extraction tools to evaluate model fit and diagnostics.

This lesson explores the architecture of R graphics, focusing on the Painter’s Model where high-level functions initialize canvases and low-level functions add specific visual layers. Students will learn how to map statistical outputs, such as Hessian matrices from non-linear models, to geometric visualizations while managing R's library environments and plotting paradigms.

This lesson explores the R package ecosystem, distinguishing between the CRAN global repository and local library management while introducing tools for package introspection and environment configuration. Students will also learn about the role of namespaces in ensuring function integrity and how to maintain reproducible, portable code across different system architectures.