View source: R/create_banded_lcps.R
create_banded_lcps  R Documentation 
Calculates Least Cost Paths from centre location to random locations within a specified distance band. This is based on the method proposed by Llobera (2015).
create_banded_lcps( cost_surface, location, min_distance, max_distance, radial_points, cost_distance = FALSE, parallel = FALSE, ncores = 1 )
cost_surface 

location 

min_distance 

max_distance 

radial_points 

cost_distance 

parallel 

ncores 

SpatialLinesDataFrame
(sp package). The resultant object contains least cost paths (number of LCPs is dependent on radial_points argument) calculated from a centre location to random locations within a specified distance band.
Joseph Lewis
Llobera, M. (2015). Working the digital: some thoughts from landscape archaeology. In Chapman R, Wylie A (eds), Material evidence: learning from archaeological practice (pp. 173188). Abingdon: Routledge.
r < raster::raster(nrow=50, ncol=50, xmn=0, xmx=50, ymn=0, ymx=50, crs='+proj=utm') r[] < stats::runif(1:length(r)) slope_cs < create_slope_cs(r, cost_function = 'tobler') locs < sp::spsample(as(raster::extent(r), 'SpatialPolygons'),n=1,'random') lcp_network < create_banded_lcps(cost_surface = slope_cs, location = locs, min_distance = 5, max_distance = 25, radial_points = 10, cost_distance = FALSE, parallel = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.