shar (version 1.1)

translate_raster: translate_raster

Description

Torus translation

Usage

translate_raster(raster, steps_x = NULL, steps_y = NULL,
  return_input = TRUE, simplify = FALSE, verbose = TRUE)

Arguments

raster

RasterLayer.

steps_x, steps_y

Number of steps (cells) the raster is translated into the corresponding direction. If both are null, all possible combinations are used.

return_input

The original input data is returned as last list entry.

simplify

If n_random = 1 and return_input = FALSE only raster will be returned.

verbose

Print progress report.

Value

list

Details

Torus translation test as described in Harms et al. (20001). The raster is shifted in all four cardinal directions by steps equal to the raste resolution. If a cell exits the extent on one side, it enters the extent on the opposite side.

References

Harms, K. E., Condit, R., Hubbell, S. P., & Foster, R. B. (2001). Habitat associations of trees and shrubs in a 50-ha neotropical forest plot. Journal of Ecology, 89(6), 947-959.

See Also

randomize_raster

Examples

Run this code
# NOT RUN {
landscape_classified <- classify_habitats(landscape, classes = 5)

landscape_random <- translate_raster(landscape_classified)
landscape_random_sub <- translate_raster(landscape_classified, steps_x = 1:10, steps_y = 1:5)
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace