Quay lại Khóa học
AI014 Nghề nghiệp

Một Giới thiệu về Lập trình R

Khóa học này là một giới thiệu toàn diện về môi trường ngôn ngữ R, bao gồm các chủ đề cốt lõi từ các thao tác cơ bản với vector số, thuộc tính đối tượng, xử lý mảng và ma trận, quản lý danh sách và khung dữ liệu, đến mô hình hóa thống kê và sản xuất đồ họa chất lượng cao. Khóa học rất phù hợp như một tài liệu giới thiệu cho phân tích thống kê và khoa học dữ liệu.

4.9
30.0h
716 học viên
10 lessons
2 lượt thích
Trí tuệ nhân tạo
Bắt đầu học

Tổng quan khóa học

📚 Tóm tắt nội dung

Khóa học này là một giới thiệu toàn diện về môi trường ngôn ngữ R, bao gồm các chủ đề cốt lõi từ các thao tác cơ bản trên vector số, thuộc tính đối tượng, xử lý mảng/khối đến quản lý danh sách/đối tượng dữ liệu, mô hình thống kê và sản xuất đồ họa chất lượng cao. Khóa học phù hợp làm sách giáo khoa giới thiệu cho phân tích thống kê và khoa học dữ liệu.

Nắm vững nền tảng của ngôn ngữ R và mở cánh cửa đến tính toán thống kê cũng như trực quan hóa dữ liệu.

Tác giả: Nhóm phát triển R

Ghi nhận: Tài liệu này do Nhóm phát triển chính của R duy trì. Bản dịch tiếng Trung cảm ơn nền tảng bản dịch tiếng Nhật của Shigeru MASE, cùng sự đóng góp của nhóm dịch thuật tiếng Trung gồm Tiến sĩ ZP Li, Tiến sĩ Rui Li,...

🎯 Mục tiêu học tập

  1. Khởi tạo phiên làm việc R, điều hướng hệ thống trợ giúp và áp dụng các quy tắc cú pháp cơ bản (phân biệt chữ hoa/chữ thường, gán giá trị và chú thích).
  2. Phân biệt và tạo các vector logic, vector ký tự, đồng thời xử lý các giá trị thiếu (NANaN).
  3. Sử dụng bốn phương thức chỉ mục khác nhau để chọn, loại bỏ hoặc sửa đổi các phần con dữ liệu cụ thể.
  4. Nhận biết và thay đổi các thuộc tính nội tại (kiểu và độ dài) của đối tượng R.
  5. Sử dụng các hàm class()attr() để quản lý thông tin mô tả đối tượng và cấu trúc dữ liệu.
  6. Tạo và thao tác các yếu tố (factors) và yếu tố có thứ tự để biểu diễn dữ liệu phân loại.
  7. Định nghĩa và xây dựng mảng và ma trận bằng vector chiều và hàm array().
  8. Áp dụng các kỹ thuật chỉ mục nâng cao, bao gồm sử dụng ma trận chỉ mục để trích xuất hoặc sửa đổi các phần tử cụ thể.
  9. Thực hiện các phép toán đại số tuyến tính bao gồm tích ngoài, chuyển vị tổng quát và nghịch đảo ma trận.
  10. Xây dựng và chỉnh sửa danh sách: Tạo danh sách có tên và không tên, kết hợp chúng bằng cú pháp R cụ thể.

Bài học

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.