- RStudio Introduction
- RStudio Projects
- Organize Files in RStudio
Sometimes you need to organize files and folders directly in RStudio. Other times you will have access to File Explorer in Windows where you can create files and folders and organize files and folders.
Below is a session at the console. The project is called MyTestProject and the directory (folder) is called the same, MyTestProject.
> list.files() [1] "LibrariesLoad.R" "MyTestProject.Rproj" "New Text Document.txt" > dir.create("data") > dir.create("code") > dir.create('results') > list.files() [1] "code" "data" "LibrariesLoad.R" "MyTestProject.Rproj" [5] "New Text Document.txt" "results"
You can list the files and folders within a folder called data with the command list.files(“data”).
Learn with YouTube
This post is partly based on the video called Three approaches to organize your R project (CC178) on YouTube. Later in the video he gets into git, which is beyond the scope of this post.