Skip to content

Commit

Permalink
differences for PR #263
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Mar 13, 2024
1 parent 79564c7 commit c84d8b0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions 00-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,16 @@ called an **RStudio Project**. An RStudio project allows you to more easily:
- Restart work where you left off
- Collaborate, especially if you are using version control such as [git](https://swcarpentry.github.io/git-novice/).

Using an RStudio project also has the key benefit of correctly setting your working directory when in an R session.
This is important because R will look for files in the working directory by default.
If you don't set your working directory, you may have to specify the full path (the location on your drive) to a
file every time you want to read or write it. Sometimes people will use `setwd()` to manually
set the working directory for a script, but this is not recommended because this approach requires the working directory to be
set every time you run your script, and can cause problems if you share your script with others or run it on a different machine.
RStudio project directories can be moved to a different location on the computer, or moved to a different computer, and they will
still work correctly because the working directory is set relative to the project directory (it sets the working directory as the directory with
the `.Rproj` file).

1. To create a project, go to the <kbd>File</kbd> menu, and click <kbd>New Project...</kbd>.

<img src="fig/new_project_window.png" alt="rstudio default session" style="width: 600px;"/>
Expand Down
2 changes: 1 addition & 1 deletion md5sum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"LICENSE.md" "b24ebbb41b14ca25cf6b8216dda83e5f" "site/built/LICENSE.md" "2024-03-12"
"config.yaml" "b91cd97fa3b408bd1ac0a00e67ab3219" "site/built/config.yaml" "2024-03-12"
"index.md" "7f9c30e6487338a0c3f8ecc4018873ab" "site/built/index.md" "2024-03-12"
"episodes/00-introduction.Rmd" "0703d3a4fb9cd0dfc4d54c78dea6fee6" "site/built/00-introduction.md" "2024-03-12"
"episodes/00-introduction.Rmd" "fa8e8d5f206166c4c96bd15ecd1e9579" "site/built/00-introduction.md" "2024-03-13"
"episodes/01-r-basics.Rmd" "2f4b7fd244990f97e0c2fe88bae2618b" "site/built/01-r-basics.md" "2024-03-13"
"episodes/02-data-prelude.Rmd" "ab2b1fd3cdaae919f9e409f713a0a8ad" "site/built/02-data-prelude.md" "2024-03-12"
"episodes/03-basics-factors-dataframes.Rmd" "cab7ab3fe53143558e6af3eee5774d35" "site/built/03-basics-factors-dataframes.md" "2024-03-12"
Expand Down

0 comments on commit c84d8b0

Please sign in to comment.