Aggregates output from runoutSim() into a raster showing how often each
cell was traversed during runout simulations. Optionally weights each walk
by a supplied vector (e.g., probability of initiation).
Arguments
- x
A list of runout simulation outputs (e.g., from
runoutSim()).- dem
A
SpatRasterobject representing the reference DEM.- method
Method of combining overlaying runout paths: "freq" and "cdf_prob" calculate the traverse frequency and cumulative distribution function probabilities for simulations from a single source cell. "max_cdf_prob" and "avg_cdf_prob" calculate the maximum/average empirical probabilites from CDF's applied to walks from invididual source cells.
- weights
Optional numeric vector of weights (same length as
x) to scale traverse frequencies.
Examples
if (FALSE) { # \dontrun{
# Convert simulated paths to a raster of transition frequencies
paths_raster <- walksToRaster(sim_paths, dem)
plot(paths_raster)
} # }