Description Usage Arguments Value Examples
View source: R/demonanalysis.R
For cells at the boundary of a population, find mean proportion of nearest neighbour sites that are empty
1 |
mat |
matrix in which empty sites are denoted NA |
a vector containing total number of empty neighbours, total number of edge cells, and average proportion of empty neighbours per edge cell
1 2 3 4 5 6 7 8 9 | mat <- image_df_from_grid_file(system.file("extdata",
"output_popgrid.dat", package = "demonanalysis", mustWork = TRUE), as_matrix = TRUE)
prob_successful_migration(mat)
# Note that the edge of the grid counts as empty space:
mat <- matrix(c(NA,NA,NA,NA,
1,1,1,1,
NA,NA,NA,NA), nrow = 3, byrow = TRUE)
prob_successful_migration(mat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.