Practical Objectives


Expected Outcomes


Task 1: The Working Directory


First and foremost, please open the R studio in your computer

Setting up the working directory in R is important for the following reasons:

  1. File Access and Management
    1. R relies on the working directory to locate files you want to import and export (like an address for each file)
  2. Saving Your Outputs
    1. efficient file saving: after setting the directory up, you ensure all generated outputs are saved where they belong
  3. How to set the working directory
setwd(" C:/path/to/your/folder")
## you can get the path of folder with the right click 
## or at first you can check your current working directory using:
getwd()
# this command returns the path to the current directory

or you can use R studio environment to set up the working directory

image.png