datacarpentry / R-ecology-lesson

Data Analysis and Visualization in R for Ecologists
https://datacarpentry.org/R-ecology-lesson/
Other
314 stars 508 forks source link

Adding instructions on how to create a folder in "Starting with data in R" lesson #797

Closed Loz4 closed 2 years ago

Loz4 commented 2 years ago

In "Starting with data in R" lesson the early instructions before the code to download.file the lesson states: "The text after the comma (“data_raw/portal_data_joined.csv”) is the destination of the file on your local machine. You’ll need to have a folder on your machine called “data_raw” where you’ll download the file."

This is vague/out of context without more introductory context to using R/RStudio, as you can't just create a folder anywhere on your machine called "data_raw" and have R send the file there via download.file.

Suggest adding instructions to use and script instructing use of dir.create("folder_name") to create the folder directory. It is the simplest/quickest way to create a folder so the module works for instructors and students to follow the script.

So suggest addition of something like the following (plus adding dir.create("data_raw") to the code line): "The text after the comma (“data_raw/portal_data_joined.csv”) is the destination of the file on your local machine. You’ll need to have a folder on your machine called “data_raw” where you’ll download the file. The easiest way to create a directory folder in your project is to use dir.create("folder_name")"

Teebusch commented 2 years ago

Hi @Loz4, thank you for your suggestion!

The data_raw folder is created when we set up the working directory in one of the previous chapters"Before we start". Both, dir.create() and the GUI-way of creating folders are introduced there.

I suggest to add a link to that section, so the creation of folders is explained only once. Something like:

We created this folder in the chapter "Before we start". If you skipped that part, it may be a good idea to have a look now, to make sure your working directory is set up properly.