Felix Analytix

Felix Analytix

Share this post

Felix Analytix
Felix Analytix
How to Get Organized with RStudio Projects and Git

How to Get Organized with RStudio Projects and Git

Use RStudio Projects and Git to organize your data science projects

Felix Analytix's avatar
Felix Analytix
Dec 09, 2023
∙ Paid
2

Share this post

Felix Analytix
Felix Analytix
How to Get Organized with RStudio Projects and Git
Share

Would you like to better organize your data science projects following a simple and consistant workflow?

In my new YouTube video, I show you how to use RStudio Projects and Git version control to follow a consistant file structure and track all the changes in your code.

You will learn how to:

  • use RStudio projects and connect them to Git and GitHub (the easy way);

  • use RStudio Git panel view to commit, push and pull files with 1 click;

  • see an example of a data science project file structure.

Watch the video now:

Data science projects can quickly become chaotic without proper organization and version control. In this tutorial, you’ll learn how to use RStudio Projects and Git to maintain clean, organized, and portable data science workflows.

The Problem: Disorganized Project Folders

Many data scientists end up with folders that look like this:

  • analysis.R

  • new-analysis.R

  • new-analysis-version2.R

  • ideas-from-document.R

  • Mixed files from different projects in the same directory

This disorganized approach leads to confusion, lost work, and difficulty collaborating with others. Let’s fix this using RStudio Projects and Git version control.

Creating Your First RStudio Project

Step 1: Start a New Project

  1. Click on the New Project button in the top-right corner of RStudio

  2. You’ll see three options:

    • New Directory: Creates a new folder

    • Existing Directory: Uses an existing folder

    • Version Control: Connects to Git (we’ll cover this later)

Step 2: Choose Project Type

Select New Directory, then choose from various project templates: - Empty new project (recommended for beginners) - R package - Shiny application - Quarto projects - And other specialized templates

Step 3: Configure Your Project

  1. Directory name: This becomes your project folder name (e.g., “organized”)

  2. Subdirectory: Choose where to save your project

    • Pro tip: Create a dedicated folder for all your data science projects

    • Consider syncing with cloud storage (OneDrive, Google Drive, etc.)

  3. Optional settings:

    • Git repository (we’ll set this up separately)

    • renv for package management (recommended for advanced users)

Click Create Project to finish setup.

Subscribe to get the R code for free

Understanding Project Benefits

Automatic Working Directory

RStudio Projects automatically set your working directory to the project root. This means:

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2025 Felix Analytix
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share