---
layout: post
title: "Using paths in R and why you shouldn't be using setwd (CC179)"
blurb: "Navigating your project from within R"
author: "PD Schloss"
date: 2022-01-17 11:00
comments: false
youtube: StqDYjM6ULo
start_hash: f5cb11b7d8c5a900249c5e676269699411f0092a
end_hash: 0456b8820ef3f036ce06708f1f8a69a9a30f1a87
---

If you are creating subdirectories for your data science project you're going to need to know how to access paths in R. One thing you certainly shouldn't be using is setwd. This episode will give you the best practices for working within a project directory structure and alternatives to using setwd. This is part of a series of videos demonstrating how to functions from base R to make these data compatible with tools from the tidyverse

<iframe style="margin: 0 auto;display:block;" width="560" height="315" src="https://www.youtube.com/embed/{{ page.youtube }}" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>


## Code

You can browse the state of the repository at the
* [beginning of the episode](https://github.com/riffomonas/distances/tree/{{ page.start_hash }})
* [end of the episode](https://github.com/riffomonas/distances/tree/{{ page.end_hash }})
