Using paths in R and why you shouldn't be using setwd (CC179)

Описание к видео Using paths in R and why you shouldn't be using setwd (CC179)

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

You can find my blog post for this episode at https://www.riffomonas.org/code_club/....

The data were generated in our Kozich et al. 2013 paper (http://doi.org/10.1128/AEM.01043-13) using samples from the Schloss et al. 2012 paper (http://doi.org/10.4161/gmic.21008).

#baseR #setwd #Rstats

Want more practice on the concepts covered in Code Club? You can sign up for my weekly newsletter at https://shop.riffomonas.org/youtube to get practice problems, tips, and insights.

If you're interested in taking an upcoming 3 day R workshop be sure to check out our schedule at https://riffomonas.org/workshops/

You can also find complete tutorials for learning R with the tidyverse using...
Microbial ecology data: https://www.riffomonas.org/minimalR/
General data: https://www.riffomonas.org/generalR/

0:00 Don't use setwd in your R code
1:03 What happens when you start Rstudio from the dock
2:34 How to use setwd to change directories
3:37 What happens when you start Rstudio from an Rproj file
4:59 How to use paths to access files in R scripts
10:30 Problems with using setwd and an alternative

Комментарии

Информация по комментариям в разработке