Skip to content

Commit

Permalink
Update 05-data-structures-part2.Rmd
Browse files Browse the repository at this point in the history
In the Realistic example section, the links to download gapminder_data.csv were broken. I replaced the old links (https://raw.githubusercontent.com/swcarpentry/r-novice-gapminder/gh-pages/_episodes_rmd/data/gapminder_data.csv) with the new working tested link (https://raw.githubusercontent.com/swcarpentry/r-novice-gapminder/main/episodes/data/gapminder_data.csv)
  • Loading branch information
aforestsomewhere authored Jul 21, 2023
1 parent 9637884 commit 962b333
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 962b333

Please sign in to comment.