I assume I'm supposed to still be following along by running each code snippet on my computer. But am I supposed to have access to these files already? I don't see any hyperlinks to the dataset from the page.
Are users supposed to know that they should navigate to the github folder? Or is this available on https://r4ds.hadley.nz somewhere? (wget -r couldn't find them.)
Or should I replace data/gapminder with some function from the gapminder package that returns a path to a folder of these files?
As a second, lesser point, when I run this code I get an empty list:
I find this behaviour surprising. I was expecting an error, because the folder doesn't exist. (Like ls in bash, or python's os.listdir.) Perhaps it's worth mentioning this behaviour?
I'm reading Iteration: 26.3.1 Listing files in a directory:
I assume I'm supposed to still be following along by running each code snippet on my computer. But am I supposed to have access to these files already? I don't see any hyperlinks to the dataset from the page. Are users supposed to know that they should navigate to the github folder? Or is this available on https://r4ds.hadley.nz somewhere? (
wget -r
couldn't find them.) Or should I replacedata/gapminder
with some function from thegapminder
package that returns a path to a folder of these files?As a second, lesser point, when I run this code I get an empty list:
I find this behaviour surprising. I was expecting an error, because the folder doesn't exist. (Like
ls
in bash, or python'sos.listdir
.) Perhaps it's worth mentioning this behaviour?