Rstudio

  • Preparing Your Workplace for an Analysis

    Create a working directory

    Usually, people want to keep the folder structure on their computers tidy, so that they and their co-workers understand, which documents and data were used for a particular project – even if that project was finished months ago. This should also be the case when you work with R. Therefore, I recommend to create a new folder for every new project, which becomes the so-called working directory. There you put all the files, which are necessary for a project. For example, for this introduction I created the folder r_intro in my file explorer and I recommend to do the same on your computer now.

  • Installing R and RStudio

    For this introduction I recommend to install two software packages on your system:

    • R: The software, which does all the calculations.
    • RStudio: The working environment, where all the code will be developed.

    Note that the instructions of this section were written for a standard installation on a private computer. If you work on a corporate machine, the installation could be different due to different IT requirements of your company.

    Installing R

    A proper installation of R is the prerequisite of everything that will follow. Fortunately, installing R is easy and can be done quickly by following these steps: