begin ex01

This commit is contained in:
eneller
2025-10-20 20:38:05 +02:00
parent 2dfb2d7b22
commit 6051456529
5 changed files with 502 additions and 19 deletions

View File

@@ -12,25 +12,23 @@ library(DataExplorer)
library(raster)
library(rworldmap)
library(sp)
# TODO library(sf)
library(sf) # https://aur.archlinux.org/packages/udunits
```
## R Markdown
## Croatian Destinations
Write an R script that creates a map of Croatia. On
the map, mark 3 places you would like to visit.
Use the rworldmap library. Use Geonames to obtain
coordinates: https://www.geonames.org
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
```{r cars}
summary(cars)
```
## Including Plots
You can also embed plots, for example:
```{r pressure, echo=FALSE}
plot(pressure)
```
Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.
```{r croatia}
library(rworldmap)
world <- getMap(resolution = "low")
plot(world, xlim = c(20, 30), ylim = c(35, 71)
, asp = 1
, col = "white"
,bg = "lightblue", # background (sea) color
)
#points(airports$lon, airports$lat, col = "red", cex = .6)
```