R includes several functions that can be used for reading, visualizing, and analyzing spatial data. Moreover, the contribution of the open-source software community makes R an extremely powerful analysis and visualization tool for spatial data. CRAN Task View - Analysis of Spatial Data lists and describes many of those contributed packages.
Note: The
rgdal
package retired in October 2023. Hence, other equivalent package functions are required to work with spatial data.
In the subsequent sections, we will mainly deal with the following packages:
sp
and sf
for handling spatial vector
dataterra
for input/output operations,
coordinate transformations as well as advanced handling and
visualization of raster and vector dataspatstat
for point pattern
analysisPlease be aware that the methods we apply in the subsequent sections may be implemented in other packages as well. Depending on your particular application, it might be useful to look for other packages as well.
Citation
The E-Learning project SOGA-R was developed at the Department of Earth Sciences by Kai Hartmann, Joachim Krois and Annette Rudolph. You can reach us via mail by soga[at]zedat.fu-berlin.de.
Please cite as follow: Hartmann, K., Krois, J., Rudolph, A. (2023): Statistics and Geodata Analysis using R (SOGA-R). Department of Earth Sciences, Freie Universitaet Berlin.