Description Usage Arguments Value Examples
Removes variable(s) from a Spatial*DataFrame
1 | remove_var(spdf, var = NULL)
|
spdf |
A Spatial*DataFrame object |
var |
A vector of variable names or indexes to remove. |
An object of the same class as spdf
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # An example with a SpatialPointsDataFrame object:
# devtools::install_github("epix-project/imhen")
library(sf)
stations <- as(imhen::stations, "Spatial")
stations
remove_var(stations, "elevation")
remove_var(stations, 2)
remove_var(stations)
# An example with a SpatialPoints object:
# download vietnam admin1 administrative map in the internal library and in
# the working direction
vn <- sptools::gadm("vietnam", "sp", 1, intlib = TRUE, save = TRUE)
vn
remove_var(vn, c(6, 9))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.