Chapter 21 Analysing the pine densities at Arne

21.1 Introduction

In the last handout we extracted variables that may (or may not) be associated with the densities of pines that were measured in the quadrats at Arne. To do this we used R as a Geographical Information system. Now that we have built a data table we can return to using R for statistical analysis.

It is probably a good idea to start a new markdown document for this part of the assignment work. To prevent confusion clear the Environment using the “sweeping brush” in the top right panel.

21.1.1 Loading libraries

knitr::opts_chunk$set(echo = TRUE,message = FALSE,warning = FALSE)

We are not going to make maps, so we don’t need as many libraries.

library(aqm)
library(ggplot2)

library(dplyr)
library(mgcv)

You now just need to read in the data.

d<-read.csv(file="arne_quadrats.csv")
 
# Alternative data load. Only use these lines if you have problems loading the csv
# Uncommenting (removing the # activates the code)
# data(arne_quads)
# d<-arne_quads
dt(d)