Description Usage Arguments Value Examples
Sample randomly N
points to initiate the search for suitable gradients
1 2 3 | get_transect_search_points(N, grid_mask1, mywindow = NULL,
inhibit_dist = NULL, grid_maskNA = NULL, initfile = NA_character_,
initwindowfile = NA_character_, seed = NULL, verbose = TRUE)
|
N |
An integer value. The number of search points to generate. |
grid_mask1 |
A |
mywindow |
A |
inhibit_dist |
A numeric value or |
grid_maskNA |
A |
initfile |
A filename (and its path) or |
initwindowfile |
A filename (and its path) or |
seed |
An integer value, |
verbose |
A logical value. If |
A SpatialPoints
object with N
unique points. If a suitable initfile
is provided, then the returned object is also stored to disk.
1 2 3 4 5 6 7 8 9 | path_demo <- system.file("extdata", package = "ecotoner")
abutt_eg <- raster::raster(file.path(path_demo, "abutt_eg.grd"))
elev_eg <- raster::raster(file.path(path_demo, "elev_eg.grd"))
(temp <- get_transect_search_points(N = 10, grid_mask1 = abutt_eg, grid_maskNA = elev_eg))
raster::plot(elev_eg)
raster::image(raster::calc(abutt_eg, fun = function(x) ifelse(!is.na(x) & x == 1, 1, NA)), col = "black", add = TRUE)
points(temp, col = "red", lwd = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.