К курсам
AI014 Профессиональное

Введение в программирование на языке R

Этот курс представляет собой всестороннее введение в среду программирования на языке R, охватывающее основные темы: операции с числовыми векторами, атрибуты объектов, обработка массивов и матриц, управление списками и данными, статистическое моделирование и создание качественных графиков. Он отлично подходит в качестве вводного руководства по статистическому анализу и наукам о данных.

4.9
30.0h
716 учеников
10 lessons
2 лайки
Искусственный интеллект
Начать обучение

Обзор курса

📚 Краткое содержание

Этот курс представляет собой всестороннее введение в среду языка программирования R, охватывающее основные темы от базовых операций с числовыми векторами, атрибутов объектов и работы с массивами/матрицами до управления списками и данными, статистического моделирования и создания качественных графиков. Он подходит в качестве вводного учебника для анализа данных и науки о данных.

Освойте основы языка R и откройте дверь к статистическим вычислениям и визуализации данных.

Автор: Команда разработчиков R

Благодарности: Настоящее руководство поддерживается командой разработчиков R. Китайская версия благодарит Шигеру Масэ за основу японского перевода, а также докторов Цзяньпин Ли, Руй Ли и других членов команды по переводу на китайский язык.

🎯 Цели обучения

  1. Инициализировать сессии R, ориентироваться в системе справки и применять основные правила синтаксиса (регистрозависимость, присваивания, комментарии).
  2. Различать и создавать логические векторы, символьные векторы, а также работать с отсутствующими значениями (NA и NaN).
  3. Использовать четыре различных метода индексирования для выбора, исключения или изменения конкретных подмножеств данных.
  4. Определять и изменять внутренние атрибуты объектов R (тип и длину).
  5. Использовать функции class() и attr() для управления метаданными и структурами данных.
  6. Создавать и управлять факторами и упорядоченными факторами для представления категориальных данных.
  7. Определять и создавать массивы и матрицы с использованием векторов размерностей и функции array().
  8. Применять продвинутые техники индексирования, включая использование матриц индексов для извлечения или модификации конкретных элементов.
  9. Выполнять операции линейной алгебры, включая внешние произведения, обобщённые транспонирования и обращение матриц.
  10. Создавать и модифицировать списки: создавать именованные и безымянные списки, объединять их с помощью специфичного синтаксиса R.

Уроки

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.