Torna ai corsi
AI014 Professionale

Un'introduzione alla programmazione in R

Questo corso offre un'introduzione completa all'ambiente di programmazione R, coprendo argomenti fondamentali come operazioni base sui vettori numerici, attributi degli oggetti, elaborazione di array e matrici, gestione di liste e frame di dati, fino alla modellazione statistica e alla produzione di grafici di alta qualità. È particolarmente adatto come testo introduttivo per l'analisi statistica e la scienza dei dati.

4.9
30.0h
716 studenti
10 lessons
2 mi piace
Intelligenza Artificiale
Inizia ad imparare

Panoramica del corso

📚 Riepilogo del contenuto

Questo corso è un'introduzione completa all'ambiente linguistico R, che copre argomenti fondamentali che vanno dalle operazioni di base sui vettori numerici, alle proprietà degli oggetti e alla gestione di array/matrice, fino alla gestione di liste e frame di dati, modellazione statistica e produzione di grafici di alta qualità. È adatto come testo introduttivo per l'analisi statistica e la scienza dei dati.

Padroneggia i concetti fondamentali del linguaggio R e apri la porta al calcolo statistico e alla visualizzazione dei dati.

Autore: Team Core di R

Ringraziamenti: Questo manuale è mantenuto dal Team Core di R. La versione in lingua cinese ringrazia Shigeru MASE per il lavoro di traduzione dalla versione giapponese, nonché Dr. ZP Li, Dr. Rui Li e altri membri del team di traduzione in cinese.

🎯 Obiettivi di apprendimento

  1. Avviare sessioni R, navigare nel sistema di aiuto e applicare le regole di sintassi di base (sensibilità al caso, assegnazioni e commenti).
  2. Distinguere tra vettori logici, vettori carattere e gestire valori mancanti (NA e NaN).
  3. Utilizzare quattro metodi distinti di indicizzazione per selezionare, escludere o modificare sottoinsiemi specifici di dati.
  4. Identificare e modificare le proprietà intrinseche (tipo e lunghezza) degli oggetti R.
  5. Utilizzare le funzioni class() e attr() per gestire metadati e strutture dati degli oggetti.
  6. Creare e manipolare fattori e fattori ordinati per rappresentare dati categorici.
  7. Definire e costruire array e matrici usando vettori di dimensione e la funzione array().
  8. Applicare tecniche avanzate di indicizzazione, inclusa l'uso di matrici di indice per estrarre o modificare elementi specifici.
  9. Eseguire operazioni di algebra lineare, compresi prodotti esterni, trasposizioni generalizzate e inversioni matriciali.
  10. Costruire e modificare liste: creare liste con nomi e senza nomi e combinarle usando sintassi specifica di R.

Lezioni

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.