Posts

Showing posts with the label VALLICROSA:

Introduction to R, Part IV Loops and Functions

[SQUEAKING] [RUSTLING] [CLICKING] HELENA VALLICROSA: Now is where things get interesting and where we're going to use the power of the computer to make our lives easier and not prevent us from doing mechanical stuff over and over. So we're just going to set some commands, and the computer is going to run them for us without us being there repeating the stuff. So there are two different types of loops. We have for loops and the while loops. The main difference between them is that for loops are static, so they are going to be repeated for the amount of iterations that we set at the beginning. But then we have the while loops, which are the ones that are going to stop once a command is reached. So whenever there's a constant that has overpassed or whatever is a different that has been fulfilled. You'll see that further when I'll explain them a little bit more in detail. So let's just go with for loop at the beginning. I'm just going to create a v...

Introduction to GIS, Part II Vectorial Maps, Raster Maps, and Time Series

[SQUEAKING] [RUSTLING] [CLICKING] HELENA VALLICROSA: All right, so we are back to the code. And now we're going to start applying the concepts that we've been talking to on R. So the first thing is to read vectorial maps. How do we read vectorial maps? Well here I included a web page where you can download vectorial maps. They are basically physical vectors of the global Earth, so you can find the coastal barriers. The packages we're going to use are these three. I have already installed them. But feel free to install them, and then lock them into the session. There are several ways to read vectorial maps. I just include three of them here. There's this one. My personal preference is the second one. There's this third one that I just put them in common. So in the first one this, which is using this function right here, the projection needs to be specified previously. So here is what I am doing. I'm just saying that I'm using the projection long...