I have data on various climate variables in acsii grid format. I have imported data into R using
Rainfall<-read.asciigrid("E:/R Learning Project/Rainfall.txt")
and then used
plot(Rainfall) to plot the Rainfall density on the map of UK (since the data is of UK climate).
I want to run a Generalized Linear Model for the presence of a plant species in a specific area of UK (in order to identify the climatic variable/s responsible for the presence of that species and subsequently apply that model in other parts of UK to predict the presence of the plant specie under study).
At this point I have two issues:
- the ascii grid file I've imported contains data of Rainfall, Temperature and other variables for whole of the UK but I only need values of these variables for only a specific region of UK.
- how can I extract values of all these variables for the region of my interest and then put them together to run a GLM model?
I can understand that I'm asking for a lot of answer but it would be of great help if I can receive a even a brief hint towards the right direction.