These include xy = TRUE which instructs the function to create x and y coordinate columns from the data, and na.rm = TRUE which removes blank cells (this will help reduce the size of our dataframe given that elev.r does not fill its extent’s rectangular outline).
This function has a special method for raster layers, as such, it adds parameters unique to this method. The elev.r raster is in a RasterLayer format and will need to be converted to a dataframe using the as.ame function from the raster package. However, the raster layer must be in a dataframe format with x, y and z columns. You can also add raster layers to the map. Here, p.sf is in a coordinate system different from the other layers. Note that ggplot will convert coordinate systems on-the-fly as needed. Ggplot() + geom_sf( data = s.sf, aes( fill = Income)) + geom_sf( data = rail.sf, col = "white") + geom_sf( data = p.sf, col = "green")
Creating a spatial object from a data frame.A Reading and writing spatial data in R.14.2 Statistical Approach to Interpolation.14.1.3 Fine tuning the interpolation parameters.14.1 Deterministic Approach to Interpolation.13.1.2 Monte Carlo approach to estimating significance.12.4 Monte Carlo test with K and L functions.12.2.2 A better approach: a Monte Carlo test.12.2.1 ArcGIS’ Average Nearest Neighbor Tool.11.3.3 The Pair Correlation Function \(g\).11.2.3 Modeling intensity as a function of a covariate.10.5.1 Mathematical operators and functions.9.1.4 Building the Geographic Coordinate System.8 Spatial Operations and Vector Overlays.7.5 Problem when performing bivariate analysis.4.4 So how do I find a proper color scheme for my data?.