Description Usage Arguments Examples

Wraps the irl_graph, acc_path, and irl_acc functions

This high level function allows for generation of an accumulated cost surface from a single function call

1 2 |

`dm` |
matrix 2d cost values |

`poicoords` |
matrix 2 column point-of-interest coordinates |

`cutoff` |
numeric between 0 and 1. Determines the threshold at which a cell is determined "very important" |

`grainprop` |
numeric proportion of cells to be included as "grain cells" |

`costsurf` |
raster cost surface |

`scoord` |
matrix matrix 2 column starting coordinates |

`snode` |
numeric starting node |

`irregular` |
logical skip irregular node subsetting routine? |

`warn` |
logical print warnings? |

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ```
## Not run:
set.seed(123) #make reproducible
dm <- as.matrix(read.delim(system.file(
"extdata/etherington20120code/cost-surface20x20.txt",
package = "irlgraph"), skip = 6, na.strings = "-9999", header = FALSE, sep = " "))
costsurf <- raster::raster(nrows=dim(dm)[1],ncols=dim(dm)[2],resolution=1,xmn=0,
xmx = dim(dm)[1], ymn = 0, ymx = dim(dm)[2]) #neccessary to set resolution
costsurf[] <- dm
poicoords <- matrix(c(10.5, 10.5), ncol = 2)
result <- irl_acc(dm, poicoords = poicoords, grainprop = 0.25,
costsurf = costsurf, scoord = matrix(c(19.5, 0.5, 11.5, 11.5),
ncol = 2, byrow = TRUE))
result <- irl_acc(dm, poicoords = poicoords, grainprop = 0.25,
costsurf = costsurf, scoord = matrix(c(11.5, 11.5),
ncol = 2, byrow = TRUE))
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.