
```{r setup45, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, warning=FALSE,message = FALSE)
```

# Arne data analysis part two

## Load packages and data

```{r}
library(tidyverse)
library(mgcv)
library(aqm)
library(sf)
```

The second part of the analysis uses data that have been processed using the GIS components of R. Students speculated that the density of regenerating pines (numbers of pines per square meter) in the heathland area may be influenced by the moisture of the soil, the ammount of insolation the microsite recieves, the height above sea level and/or the distance to the nearest seed source. Are any of these elements clearly related to pine density? You can analyse these data using the simple techniques that you have seen so far. In the next classes we will see how R was used to add these potentially important variables to the data collected by the students.

```{r}
data(arne_quads)
d<-arne_quads[,-c(1:3)]
str(d)
```

Pine density = numbers of pines per meter squared  
twi = Topographic wetness index (no units)  
sol = Direct beam insolation  
slope = slope in degrees  
min_dist = minimum distance to nearest seed source.  

## Exercise

Are there any relationships between pine density and these variables? Analyse the data using techniques that you have learned on the course.



 