Closed EmmalineSheahan closed 7 years ago
Very cool! Way to stick with it! With respect to the coding style make sure you pay strict attention to the code spacing so for example you want it to look like:
for(i in 1:10) {
for(j in 1:10) {
my_awesome_code = i * j
}
}
you don't want it to look like
for(i in 1:10) {
for(j in 1:10) {
my_awesome_code = i * j
}
}
I know this difference may seem silly and trivial but when you get into more complex coding having the indents line up is critical to quickly telling what level of nesting within a piece of code you are in the ith loop or the jth loop for example. Almost more important than having efficient code is to have code that is easy for other humans (including your future self) to read and decipher. Here is a style guide that I generally adhere to: http://adv-r.had.co.nz/Style.html
I'll hold off on merging this code until you get those loops lined up correctly otherwise it looks great.
Looks great nice job!
Remember to execute git pull upstream master
… rasterize polygons at each resolution, and plot species richness at each resolution. Now that we know the code is functional we can run it at different resolutions if desired