# Programming I

## Descrizione

**Prerequisites
**Introduction to programming with R, for example Informatica I or an online introduction (see requested material)

**Objectives
**

The course is structured along computational concepts, not applications.

The topics include

- How computers calculate: floating point numbers
- Variables, types and operators
- The R language: commands and functions
- User-defined functions and modular programming
- Flow control: if, for and while
- An introduction to working with data in R
- Data sources and data APIs
- A short introduction to numerical algorithms
- Random number generation and simple simulations
- Optimization
- Finding and installing R packages
- How to write a successful R program
- Finding errors and improving R programs
- Report generation in R

**Description / Program**

he course is structured along computational concepts, not applications.

The topics include

- How computers calculate: floating point numbers
- Variables, types and operators
- The R language: commands and functions
- User-defined functions and modular programming
- Flow control: if, for and while
- An introduction to working with data in R
- Data sources and data APIs
- A short introduction to numerical algorithms
- Random number generation and simple simulations
- Optimization
- Finding and installing R packages
- How to write a successful R program
- Finding errors and improving R programs
- Report generation in R

**Learning Method / Style of Lessons**

The course is organized in seven blocks of four hours. It takes part in the first half of the semester, to leave sufficient time for the programming projects. Each block introduces a new concept and employs learning-by-doing to move from theory to practice. Students start with short tutorial **before** each class (flipped classroom). The course block itself starts with a presentation of a new concept. Next, we study a sample R program that illustrates this concept and try to understand the underlying ideas. Students will then solve a few simple programming exercises to be submitted online by the next class.

**Exam Style
**

50% individual programming exercises during the course phase

50% programming project in small groups, due at the end of the semester

**Requested Material
**

Students should bring a laptop with R and Rstudio installed to all classes

Students having no experience with R, should follow this tutorial before the course starts: https://www.datacamp.com/courses/free-introduction-to-r (free, registration required)

**Readings/Textbooks
**

All slides and sample programs will be published on iCorsi.

**Additional** **material about the R programming language**

Venables et al: An introduction to R, https://cran.r-project.org/doc/manuals/r-release/R-intro.pdf

**Additional material about the Rstudio IDE**

https://www.rstudio.com/resources/webinars/ (choose “Programming part I”)

** Additional resources will be discussed in the first lecture.
**

## Persone

Docente titolare del corso

## Informazioni aggiuntive

**Autunnale**

**2019-2020**

**3**

**Inglese**

**Master of Science in Economics, Corso obbligatorio, Minor in Data Science, 1° anno**

**Master of Science in Economics and Communication in Financial Communication, Corso a scelta, Corso a scelta, 2° anno**

**Master of Science in Economics in Finance, Corso obbligatorio, Minor in Digital Finance, 1° anno**

**Master of Science in Economics in Finance, Corso obbligatorio, Minor in Banking and Finance, 1° anno**

**Master of Science in Economics in Finance, Corso obbligatorio, Minor in Quantitative Finance, 1° anno**