Skip to content

Commit

Permalink
Fix #576
Browse files Browse the repository at this point in the history
  • Loading branch information
Robinlovelace committed Oct 4, 2020
1 parent 47c0344 commit 34e1e18
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion 07-read-write-plot.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,14 @@ A second example downloads a series of rasters containing global monthly precipi
The result is a multilayer object of class `RasterStack`.

```{r 07-read-write-plot-5}
if(!file.exists("prec_10m_bil.zip")) {
u = "https://github.com/Robinlovelace/geocompr/releases/download/1.2/prec_10m_bil.zip"
download.file(u, "prec_10m_bil.zip")
unzip("prec_10m_bil.zip", exdir = "prec")
}
library(raster)
worldclim_prec = getData(name = "worldclim", var = "prec", res = 10)
worldclim_prec = stack(list.files("prec", pattern = "bil", full.names = TRUE))
# worldclim_prec = getData(name = "worldclim", var = "prec", res = 10)
class(worldclim_prec)
```

Expand Down

0 comments on commit 34e1e18

Please sign in to comment.