Skip to content

Commit

Permalink
Merge pull request #858 from aforestsomewhere/new-test-branch
Browse files Browse the repository at this point in the history
Update 05-data-structures-part2.Rmd to fix broken links to gapminder_data.csv
  • Loading branch information
matthieu-bruneaux authored Sep 10, 2023
2 parents 604822f + 962b333 commit 70b3306
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions episodes/05-data-structures-part2.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,14 @@ gapminder <- read.csv("data/gapminder_data.csv")
The `read.csv` function can then be executed to read the downloaded file from the download location, for example,

```{r, eval=FALSE, echo=TRUE}
download.file("https://raw.githubusercontent.com/swcarpentry/r-novice-gapminder/gh-pages/_episodes_rmd/data/gapminder_data.csv", destfile = "data/gapminder_data.csv")
download.file("https://raw.githubusercontent.com/swcarpentry/r-novice-gapminder/main/episodes/data/gapminder_data.csv", destfile = "data/gapminder_data.csv")
gapminder <- read.csv("data/gapminder_data.csv")
```

- Alternatively, you can also read in files directly into R from the Internet by replacing the file paths with a web address in `read.csv`. One should note that in doing this no local copy of the csv file is first saved onto your computer. For example,

```{r, eval=FALSE, echo=TRUE}
gapminder <- read.csv("https://raw.githubusercontent.com/swcarpentry/r-novice-gapminder/gh-pages/_episodes_rmd/data/gapminder_data.csv")
gapminder <- read.csv("https://raw.githubusercontent.com/swcarpentry/r-novice-gapminder/main/episodes/data/gapminder_data.csv")
```

- You can read directly from excel spreadsheets without
Expand Down

0 comments on commit 70b3306

Please sign in to comment.