The course introduces students tho the fundamentals of R language and of the data analysis environments for R. The laboratory is designed for students who have no, or limited, previous knowledge on R. During the laboratory the students will familiarise with the basic features of the R language, the R and RStudio working environment, and the basic operations for data management and manipulation.
Knowledge and understanding Know the capabilities and the potential application domains of R Know how to use R together with other data analysis software (Excel and Stata) for data import and export Know the basic data objects managed by R and be able to manipulate them Be able to perform basic math and logical operations on data in R, basic data manipulation activities, and basic descriptive statistics analysis Know how to graphically represent data in R
Applying knowledge and understanding Be able to recognise the application domain of the features of R Starting from a dataset, be able to identify the possible analysis and data manipulation that can be performed on it
Making judgements Be able to interpret the results of the main data manipulation and analysis activities Be able to interpret the meaning of error messages provided by the R environment and be able to fix the problems autonomously
Communication skills Be able to present data in the form of reports or presentations automatically generated by R scripts combining textual descriptive parts, data tables, charts, and results of data analysis
Learning skills Be able to learn in an autonomous and self-managed way
The laboratory contains only practical activities.
The syllabus of the laboratory includes the following topics: • Introduction to the working environment of R and RStudio • Basic features of RStudio: projects, revisions control, help online, debug • Basic operations with R: updating, installing libraries, loading datasets • Basic operators: mathematical, logical, assignment • Basic data types: Boolean, vectors, matrices, arrays, lists, data frames, data tables • Data transformations • Input and output operations: R native data formats, RStudio files, and cvs and xls interoperability file formats • Writing reports with R (RMarkdown) • Revision control in RStudio • Basic mathematic and statistic functions • Data manipulation: working with dataframes and datatables • Data manipulation: selection, extract, sort • Contingency tables • Basic statistical operations: max, min, quantiles, range, IQR, se, var, correlation index, re-scaling, standardisation, linear regression • Graphical representations: basic R charts • Graphical representations: advanced R charts with ggplot • Export charts in png and pdf