Laboratory of Statistics and Mathematics 2025/2026
Basic math:
R Functions: always called by name_of_the_function()
Logical values: represent a TRUE/FALSEstatement
[1] TRUE
Factors: categorical variables with known levels
Lists:
List of objects of potentially different nature
Connect to https://giuseppealfonzetti.github.io/LSM/
Click on the “Material” (💻) icon corresponding to today lab.
Download the Excel file.
Rstudio and create an R Project for today’s practice within that folder..xlsx file in your project directory in a subdirectory called data.R Script file. Here you will write your R commands.here package to manage file paths.library() commands needed to perform the analysis. Today we will useAfter loading the R packages, use the i_am() function from the here package to tell R where your script is located. If your script is called my_script.R, run
Now that R knows your position in the directory tree of your laptop, we can read the xlsx file stored in the data folder with
# A tibble: 4 × 6
last_name first_name department seniority salary ID
<chr> <chr> <chr> <dbl> <dbl> <dbl>
1 al-Harron Fikra Marketing 4 72654. 1001
2 Whitaker Jalen HR 15 164507. 1002
3 Pillow Cleevens Sales 7 102665. 1003
4 Holguin Austin I.T. 9 138793. 1004
Course Introduction