Rプログラミング入門
このコースは、R言語環境についての包括的な入門であり、基本的な数値ベクトル操作、オブジェクト属性、配列および行列処理、リストとデータフレームの管理、統計モデル化、高品質なグラフィックス作成までをカバーしています。統計分析およびデータサイエンスの入門書として非常に適しています。
コース概要
📚 コンテンツ概要
このコースは、基本的な数値ベクトル操作、オブジェクト属性、配列/行列の取り扱いからリスト/データフレームの管理、統計モデリング、高品質なグラフィックス作成まで、R言語環境の核心トピックを網羅する包括的な導入講座です。統計分析およびデータサイエンスの入門テキストとして適しています。
R言語の核となる機能を習得し、統計計算とデータ視覚化への扉を開こう。
著者: R開発コアチーム
謝辞: 本マニュアルはR開発コアチームによって維持されています。中国語版は、増田滋郎氏による日本語訳を基盤としており、李振平博士、李瑞博士らの中国語翻訳チームの貢献に感謝します。
🎯 学習目標
- Rセッションの初期化、ヘルプシステムのナビゲーション、基本的な構文規則(大文字小文字の区別、代入、コメント)の適用。
- 真理値ベクトル、文字ベクトルを区別し、作成し、欠損値(
NAおよびNaN)を処理する。 - 4つの異なるインデックス手法を使用して、特定のデータサブセットを選択、除外、または変更する。
- Rオブジェクトの内在的属性(型と長さ)を識別・修正する。
class()関数とattr()関数を活用して、オブジェクトのメタデータやデータ構造を管理する。- カテゴリカルデータを表現するために因子および順序因子を作成・操作する。
- 次元ベクトルと
array()関数を使用して配列および行列を定義・構築する。 - 高度なインデックス技術(インデックス行列を使用した特定要素の抽出または変更など)を適用する。
- 外積、一般化転置、行列逆行列など、線形代数演算を実行する。
- リストの構築と編集:名前付きおよび名前なしのリストを作成し、特定のR構文で結合する。
レッスン 共 10 课时 · 预计 30.0h
レッスン
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.