R Under development (unstable) (2026-02-03 r89375) -- "Unsuffered Consequences" Copyright (C) 2026 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > pkgname <- "bamm" > source(file.path(R.home("share"), "R", "examples-header.R")) > options(warn = 1) > library('bamm') > > base::assign(".oldSearch", base::search(), pos = 'CheckExEnv') > base::assign(".old_wd", base::getwd(), pos = 'CheckExEnv') > cleanEx() > nameEx("adj_mat") > ### * adj_mat > > flush(stderr()); flush(stdout()) > > ### Name: adj_mat > ### Title: adj_mat: Function to compute the adjacency matrix of an area. > ### Aliases: adj_mat > > ### ** Examples > > x_coord <- c(-106.5699, -111.3737,-113.9332, + -110.8913, -106.4262, -106.5699) > y_coord <- c(16.62661, 17.72373, 19.87618, + 22.50763, 21.37728, 16.62661) > xy <- cbind(x_coord, y_coord) > p <- sp::Polygon(xy) > ps <- sp::Polygons(list(p),1) > sps <- sp::SpatialPolygons(list(ps)) > mx_grid <- bamm::shape2Grid(sps,resolution = 0.25,ones = TRUE) > mx_sparse <- bamm::model2sparse(model=mx_grid, threshold = 0.1) > adj_mx <- bamm::adj_mat(modelsparse=mx_sparse, + ngbs=1,eigen_sys=TRUE,which_eigs=1) > print(adj_mx) Set M of the BAM digram it contains 7 slots @coordinates: A matrix with longitude and latitude values of each cell of the raster area x y [1,] -110.8082 22.38263 [2,] -110.5582 22.38263 [3,] -111.3082 22.13263 [4,] -111.0582 22.13263 [5,] -110.8082 22.13263 [6,] -110.5582 22.13263 @eigen_val: Eigen values of the connectivity matrix M [1] 7.879909 @eigen_vec: Eigen vector of the connectivity matrix M [,1] [1,] -0.005016999 [2,] -0.005372111 [3,] -0.006135915 [4,] -0.009435098 [5,] -0.011856916 [6,] -0.012869369 > mx_grid_eigen <- mx_grid > mx_grid_eigen[mx_sparse@cellIDs] <- adj_mx@eigen_vec > raster::plot(mx_grid_eigen) > > > > > cleanEx() > nameEx("bam_clusters") > ### * bam_clusters > > flush(stderr()); flush(stdout()) > > ### Name: bam_clusters > ### Title: bam_clusters: Function to estimate the connectivity of suitable > ### areas > ### Aliases: bam_clusters > > ### ** Examples > > set.seed(891) > model_path <- system.file("extdata/Lepus_californicus_cont.tif", + package = "bamm") > model <- raster::raster(model_path) > model <- model > 0.7 > clusterin <- bamm::bam_clusters(model,ngbs=1,plot_model=TRUE) > raster::plot(clusterin@raster_map) > > > > cleanEx() > nameEx("bam_sim") > ### * bam_sim > > flush(stderr()); flush(stdout()) > > ### Name: bam_sim > ### Title: bam_sim: Simulate dispersal dynamics using the set B of the BAM > ### framework. > ### Aliases: bam_sim > > ### ** Examples > > # Compute dispersal dynamics of Urania boisduvalii as a function of > # palatable Omphalea > urap <- system.file("extdata/urania_omph/urania_guanahacabibes.tif", + package = "bamm") > ura <- raster::raster(urap) > ompp <- system.file("extdata/urania_omph/omphalea_guanahacabibes.tif", + package = "bamm") > omp <- raster::raster(ompp) > msparse <- bamm::model2sparse(ura) > init_coordsdf <- data.frame(x=-84.38751, y= 22.02932) > initial_points <- bamm::occs2sparse(modelsparse = msparse,init_coordsdf) > set_M <- bamm::adj_mat(modelsparse = msparse,ngbs = 1) > ura_sim <- bamm::bam_sim(sp1=ura, sp2=omp, set_M=set_M, + initial_points=initial_points, + periods_toxic=5, + periods_suitable=1, + nsteps=40) | | | 0% | |== | 2% | |==== | 5% | |===== | 8% | |======= | 10% | |========= | 12% | |========== | 15% | |============ | 18% | |============== | 20% | |================ | 22% | |================== | 25% | |=================== | 28% | |===================== | 30% | |======================= | 32% | |======================== | 35% | |========================== | 38% | |============================ | 40% | |============================== | 42% | |================================ | 45% | |================================= | 48% | |=================================== | 50% | |===================================== | 52% | |====================================== | 55% | |======================================== | 58% | |========================================== | 60% | |============================================ | 62% | |============================================== | 65% | |=============================================== | 68% | |================================================= | 70% | |=================================================== | 72% | |==================================================== | 75% | |====================================================== | 78% | |======================================================== | 80% | |========================================================== | 82% | |============================================================ | 85% | |============================================================= | 88% | |=============================================================== | 90% | |================================================================= | 92% | |================================================================== | 95% | |==================================================================== | 98% | |======================================================================| 100%> ura_omp <- bamm::sim2Raster(ura_sim) | | | 0% | |== | 2% | |==== | 5% | |===== | 8% | |======= | 10% | |========= | 12% | |========== | 15% | |============ | 18% | |============== | 20% | |================ | 22% | |================== | 25% | |=================== | 28% | |===================== | 30% | |======================= | 32% | |======================== | 35% | |========================== | 38% | |============================ | 40% | |============================== | 42% | |================================ | 45% | |================================= | 48% | |=================================== | 50% | |===================================== | 52% | |====================================== | 55% | |======================================== | 58% | |========================================== | 60% | |============================================ | 62% | |============================================== | 65% | |=============================================== | 68% | |================================================= | 70% | |=================================================== | 72% | |==================================================== | 75% | |====================================================== | 78% | |======================================================== | 80% | |========================================================== | 82% | |============================================================ | 85% | |============================================================= | 88% | |=============================================================== | 90% | |================================================================= | 92% | |================================================================== | 95% | |==================================================================== | 98% | |======================================================================| 100%> raster::plot(ura_omp[[c(1,5,10,15,20,30,35,40)]]) > > > > cleanEx() detaching ‘package:purrr’, ‘package:future’ > nameEx("bam_ssim") > ### * bam_ssim > > flush(stderr()); flush(stdout()) > > ### Name: bam_ssim > ### Title: bam_ssim: Simulate dispersal dynamics using the set B of the BAM > ### framework. > ### Aliases: bam_ssim > > ### ** Examples > > > urap <- system.file("extdata/urania_omph/urania_guanahacabibes.tif", + package = "bamm") > ura <- raster::raster(urap) > ompp <- system.file("extdata/urania_omph/omphalea_guanahacabibes.tif", + package = "bamm") > omp <- raster::raster(ompp) > msparse <- bamm::model2sparse(ura) > init_coordsdf <- data.frame(x=-84.38751, y= 22.02932) > initial_points <- bamm::occs2sparse(modelsparse = msparse,init_coordsdf) > set_M <- bamm::adj_mat(modelsparse = msparse,ngbs = 1) > ura_ssim <- bamm::bam_ssim(sp1=ura, sp2=omp, set_M=set_M, + dispersal_prob = 0.75, + initial_points=initial_points, + periods_toxic=5, + periods_suitable=1, + nsteps=40) | | | 0% | |== | 2% | |==== | 5% | |===== | 8% | |======= | 10% | |========= | 12% | |========== | 15% | |============ | 18% | |============== | 20% | |================ | 22% | |================== | 25% | |=================== | 28% | |===================== | 30% | |======================= | 32% | |======================== | 35% | |========================== | 38% | |============================ | 40% | |============================== | 42% | |================================ | 45% | |================================= | 48% | |=================================== | 50% | |===================================== | 52% | |====================================== | 55% | |======================================== | 58% | |========================================== | 60% | |============================================ | 62% | |============================================== | 65% | |=============================================== | 68% | |================================================= | 70% | |=================================================== | 72% | |==================================================== | 75% | |====================================================== | 78% | |======================================================== | 80% | |========================================================== | 82% | |============================================================ | 85% | |============================================================= | 88% | |=============================================================== | 90% | |================================================================= | 92% | |================================================================== | 95% | |==================================================================== | 98% | |======================================================================| 100%> ura_omp <- bamm::sim2Raster(ura_ssim) | | | 0% | |== | 2% | |==== | 5% | |===== | 8% | |======= | 10% | |========= | 12% | |========== | 15% | |============ | 18% | |============== | 20% | |================ | 22% | |================== | 25% | |=================== | 28% | |===================== | 30% | |======================= | 32% | |======================== | 35% | |========================== | 38% | |============================ | 40% | |============================== | 42% | |================================ | 45% | |================================= | 48% | |=================================== | 50% | |===================================== | 52% | |====================================== | 55% | |======================================== | 58% | |========================================== | 60% | |============================================ | 62% | |============================================== | 65% | |=============================================== | 68% | |================================================= | 70% | |=================================================== | 72% | |==================================================== | 75% | |====================================================== | 78% | |======================================================== | 80% | |========================================================== | 82% | |============================================================ | 85% | |============================================================= | 88% | |=============================================================== | 90% | |================================================================= | 92% | |================================================================== | 95% | |==================================================================== | 98% | |======================================================================| 100%> raster::plot(ura_omp[[c(1,2,5,10,15,20,30,35,40)]]) > > > > cleanEx() detaching ‘package:purrr’, ‘package:future’ > nameEx("community_sim") > ### * community_sim > > flush(stderr()); flush(stdout()) > > ### Name: community_sim > ### Title: community_bam: Community 'bamm' > ### Aliases: community_sim > > ### ** Examples > > > > > cleanEx() > nameEx("csd_estimate") > ### * csd_estimate > > flush(stderr()); flush(stdout()) > > ### Name: csd_estimate > ### Title: csd_estimate: Estimate the connectivity suitability and > ### dispersal plot > ### Aliases: csd_estimate > > ### ** Examples > > > > > cleanEx() > nameEx("csim2pam") > ### * csim2pam > > flush(stderr()); flush(stdout()) > > ### Name: csim2pam > ### Title: csim2pam: Converts community simulation to a Presence Absence > ### Matrix (PAM) > ### Aliases: csim2pam > > ### ** Examples > > > > > > cleanEx() > nameEx("diversity_range_analysis") > ### * diversity_range_analysis > > flush(stderr()); flush(stdout()) > > ### Name: diversity_range_analysis > ### Title: range_diversity_analysis: diversity analysis > ### Aliases: diversity_range_analysis > > ### ** Examples > > set.seed(111) > pam <- matrix(rbinom(10000,1,0.5),nrow = 100,ncol = 1000) > rdivan <- bamm::diversity_range_analysis(pam=pam, + parallel = FALSE, + niter = 10, + return_null_dfield=TRUE) New names: • `dfield` -> `dfield...1` • `dfield` -> `dfield...2` • `dfield` -> `dfield...3` • `dfield` -> `dfield...4` • `dfield` -> `dfield...5` • `dfield` -> `dfield...6` • `dfield` -> `dfield...7` • `dfield` -> `dfield...8` • `dfield` -> `dfield...9` • `dfield` -> `dfield...10` This function uses the code from: https://github.com/zpneal/fastball/blob/main/fastball.cpp Please when using the function for publications cite: Godard K, Neal ZP (2022). 'fastball: a fast algorithm to randomly sample bipartite graphs with fixed degree sequences'. Journal of Complex Networks, 10(6), cnac049. > bamm::plot(rdivan,plot_type="diversity_range") > # Lagomorphos > > > > cleanEx() detaching ‘package:purrr’, ‘package:future’ > nameEx("eigen_bam") > ### * eigen_bam > > flush(stderr()); flush(stdout()) > > ### Name: eigen_bam > ### Title: eigen_bam: Compute the Eigen system of two bam objects > ### Aliases: eigen_bam > > ### ** Examples > > > > > cleanEx() > nameEx("jaccard") > ### * jaccard > > flush(stderr()); flush(stdout()) > > ### Name: jaccard > ### Title: jaccard: Estimates the Jaccard index for comparing two binary > ### maps > ### Aliases: jaccard > > ### ** Examples > > m1_path <- system.file("extdata/conejos/Lepus_othus_cont.tif", + package = "bamm") > m2_path <- system.file("extdata/conejos/Brachylagus_idahoensis_cont.tif", + package = "bamm") > m1 <- raster::raster(m1_path) > 0.01 > m2 <- raster::raster(m2_path) >0.01 > jcc <- bamm::jaccard(m1,m2) > print(jcc) jaccard percentage_of_m1 percentage_of_m2 1 0.04545455 5.475763 21.10727 > > > > cleanEx() > nameEx("model2sparse") > ### * model2sparse > > flush(stderr()); flush(stdout()) > > ### Name: model2sparse > ### Title: model2sparse: Converts a niche model into a diagonal sparse > ### matrix > ### Aliases: model2sparse > > ### ** Examples > > model_path <- system.file("extdata/Lepus_californicus_cont.tif", + package = "bamm") > model <- raster::raster(model_path) > > sparse_mod <- bamm::model2sparse(model, threshold=0.75) > print(sparse_mod) Set A of the BAM digram it contains 8 slots @niche_model: a niche model: class : RasterLayer dimensions : 91, 159, 14469 (nrow, ncol, ncell) resolution : 0.2, 0.2 (x, y) extent : -118.4042, -86.60417, 14.51846, 32.71846 (xmin, xmax, ymin, ymax) crs : +proj=longlat +datum=WGS84 +no_defs source : memory names : layer values : 0, 1 (min, max) @suit_threshold: Threshold value used to binarize model@cellIDs: ids of the cells that have values (4281 pixels) @suit_values: Suitability values of the continuous model @sparse_model: A sparse square matrix of 4281 x 4281 entries @coordinates: Pixel centroid coordinates of the model > raster::plot(sparse_mod@niche_model) > > > > cleanEx() > nameEx("models2pam") > ### * models2pam > > flush(stderr()); flush(stdout()) > > ### Name: models2pam > ### Title: models2pam: Converts binary rasters to a PAM > ### Aliases: models2pam > > ### ** Examples > > > > > cleanEx() > nameEx("null_dispersion_field_distribution") > ### * null_dispersion_field_distribution > > flush(stderr()); flush(stdout()) > > ### Name: null_dispersion_field_distribution > ### Title: null_dispersion_field_distribution: Null distribution of the > ### dispersion field > ### Aliases: null_dispersion_field_distribution > > ### ** Examples > > set.seed(111) > pam <- matrix(rbinom(100,1,0.3),nrow = 10,ncol = 10) > dfield_rand <- bamm::null_dispersion_field_distribution(pam,n_iter=10, + parallel=FALSE, + randal="indep_swap", + n_cores = 2) New names: • `dfield` -> `dfield...1` • `dfield` -> `dfield...2` • `dfield` -> `dfield...3` • `dfield` -> `dfield...4` • `dfield` -> `dfield...5` • `dfield` -> `dfield...6` • `dfield` -> `dfield...7` • `dfield` -> `dfield...8` • `dfield` -> `dfield...9` • `dfield` -> `dfield...10` > head(dfield_rand) dfrand_1 dfrand_2 dfrand_3 dfrand_4 dfrand_5 dfrand_6 dfrand_7 dfrand_8 [1,] 0.6 0.8 0.8 0.8 0.6 0.5 0.5 0.8 [2,] 0.8 0.8 1.1 1.0 0.9 1.1 0.8 0.9 [3,] 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 [4,] 0.3 0.3 0.3 0.1 0.3 0.3 0.3 0.3 [5,] 1.4 1.4 1.2 1.4 1.2 1.4 1.4 1.2 [6,] 0.3 0.3 0.3 0.3 0.5 0.5 0.5 0.3 dfrand_9 dfrand_10 [1,] 0.6 0.6 [2,] 0.7 1.1 [3,] 0.0 0.0 [4,] 0.5 0.1 [5,] 1.4 1.3 [6,] 0.5 0.5 > > > > cleanEx() detaching ‘package:purrr’, ‘package:future’ > nameEx("occs2sparse") > ### * occs2sparse > > flush(stderr()); flush(stdout()) > > ### Name: occs2sparse > ### Title: occs2sparse: Converts occurrence data into a sparse matrix > ### object > ### Aliases: occs2sparse > > ### ** Examples > > > model_path <- system.file("extdata/Lepus_californicus_cont.tif", + package = "bamm") > model <- raster::raster(model_path) > > sparse_mod <- bamm::model2sparse(model,threshold=0.05) > > occs_lep_cal <- data.frame(longitude = c(-115.10417, + -104.90417), + latitude = c(29.61846, + 29.81846)) > > occs_sparse <- bamm::occs2sparse(modelsparse = sparse_mod, + occs = occs_lep_cal) > > head(occs_sparse) 6 x 1 sparse Matrix of class "dgCMatrix" [1,] . [2,] . [3,] . [4,] . [5,] . [6,] . > > > > cleanEx() > nameEx("pam2bioindex") > ### * pam2bioindex > > flush(stderr()); flush(stdout()) > > ### Name: pam2bioindex > ### Title: pam2bioindex: PAM to biodiversity index > ### Aliases: pam2bioindex > > ### ** Examples > > set.seed(111) > pam <- matrix(rbinom(100,1,0.3),nrow = 10,ncol = 10) > bioindices <- bamm::pam2bioindex(pam=pam,biodiv_index="all") > # Return results as sparse models > bioindices <- bamm::pam2bioindex(pam=pam,biodiv_index="all",as_sparse=TRUE) > bioindices@alpha 10 x 1 Matrix of class "dgeMatrix" [,1] [1,] 2 [2,] 3 [3,] 0 [4,] 1 [5,] 4 [6,] 1 [7,] 1 [8,] 5 [9,] 3 [10,] 5 > bioindices@omega 10 x 1 Matrix of class "dgeMatrix" [,1] [1,] 1 [2,] 1 [3,] 2 [4,] 3 [5,] 3 [6,] 3 [7,] 1 [8,] 3 [9,] 3 [10,] 5 > bioindices@dispersion_field 10 x 1 Matrix of class "dgeMatrix" [,1] [1,] 0.6 [2,] 0.9 [3,] 0.0 [4,] 0.3 [5,] 1.1 [6,] 0.3 [7,] 0.5 [8,] 1.3 [9,] 1.0 [10,] 1.7 > > > > cleanEx() > nameEx("pam2richness") > ### * pam2richness > > flush(stderr()); flush(stdout()) > > ### Name: pam2richness > ### Title: pam2richness: Converts Presence Absence Matrix (pam object) to > ### richness raster > ### Aliases: pam2richness > > ### ** Examples > > > > > cleanEx() > nameEx("permute_pam") > ### * permute_pam > > flush(stderr()); flush(stdout()) > > ### Name: permute_pam > ### Title: permute_pam: Function to permute a Presence-Absence-Matrix. > ### Aliases: permute_pam > > ### ** Examples > > set.seed(111) > pam <- matrix(rbinom(100,1,0.3),nrow = 10,ncol = 10) > ppam <- bamm::permute_pam(m = pam,niter = NULL,as_sparse = FALSE) > # Check if matrices are different > all(pam == ppam) [1] FALSE > # Check if row totals are the same > all(Matrix::rowSums(pam) == Matrix::rowSums(ppam)) [1] TRUE > # Check if column total are the same > all(Matrix::colSums(pam) == Matrix::colSums(ppam)) [1] TRUE > > > > cleanEx() > nameEx("pol2pam") > ### * pol2pam > > flush(stderr()); flush(stdout()) > > ### Name: pol2pam > ### Title: Convert distribution polygons to a presence-absence matrix (PAM) > ### Aliases: pol2pam > > ### ** Examples > > ## Not run: > ##D # Load required libraries > ##D library(raster) > ##D > ##D # Example with sample data > ##D uicn <- readRDS(system.file("extdata/uicn.rds",package = "bamm")) > ##D sudam <- readRDS(system.file("extdata/suam.rds",package = "bamm")) > ##D # Convert to PAM with 0.5 degree resolution > ##D pam_result <- bamm::pol2pam(poly = uicn, > ##D taxon_attribute = "binomial", > ##D resolution = 0.5, > ##D polymask = NULL) > ##D > ##D # With masking polygon > ##D pam_masked <- pol2pam(poly = uicn, > ##D taxon_attribute = "binomial", > ##D resolution = 0.5, > ##D polymask = sudam) > ## End(Not run) > > > > > cleanEx() > nameEx("predict") > ### * predict > > flush(stderr()); flush(stdout()) > > ### Name: predict,bam-method > ### Title: Predict method of the package 'bamm'. > ### Aliases: predict,bam-method predict bam-method > > ### ** Examples > > # rm(list = ls()) > # Read raster model for Lepus californicus > model_path <- system.file("extdata/Lepus_californicus_cont.tif", + package = "bamm") > model <- raster::raster(model_path) > # Convert model to sparse > sparse_mod <- bamm::model2sparse(model = model,threshold=0.1) > # Compute adjacency matrix > adj_mod <- bamm::adj_mat(sparse_mod,ngbs=1) > > # Initial points to start dispersal process > > occs_lep_cal <- data.frame(longitude = c(-115.10417, + -104.90417), + latitude = c(29.61846, + 29.81846)) > # Convert to sparse the initial points > occs_sparse <- bamm::occs2sparse(modelsparse = sparse_mod, + occs = occs_lep_cal) > > # Run the bam (sdm) simultation for 100 time steps > smd_lep_cal <- bamm::sdm_sim(set_A = sparse_mod, + set_M = adj_mod, + initial_points = occs_sparse, + nsteps = 10) /data/gannet/ripley/R/test-dev/RcppArmadillo/include/current/armadillo_bits/arrayops_meat.hpp:47:16: runtime error: null pointer passed as argument 1, which is declared to never be null #0 0x7b4f14c15fa6 in void arma::arrayops::fill_zeros(double*, unsigned long long) /data/gannet/ripley/R/test-dev/RcppArmadillo/include/current/armadillo_bits/arrayops_meat.hpp:47 #1 0x7b4f14c15fa6 in void arma::arrayops::fill_zeros(double*, unsigned long long) /data/gannet/ripley/R/test-dev/RcppArmadillo/include/current/armadillo_bits/arrayops_meat.hpp:39 #2 0x7b4f14c15fa6 in arma::Mat::zeros() /data/gannet/ripley/R/test-dev/RcppArmadillo/include/current/armadillo_bits/Mat_meat.hpp:7941 #3 0x7b4f14c15fa6 in arma::Mat& arma::Mat::fill(arma::fill::fill_class const&) /data/gannet/ripley/R/test-dev/RcppArmadillo/include/current/armadillo_bits/Mat_meat.hpp:7923 #4 0x7b4f14c15fa6 in arma::Col::Col(unsigned long long, arma::fill::fill_class const&) /data/gannet/ripley/R/test-dev/RcppArmadillo/include/current/armadillo_bits/Col_meat.hpp:171 #5 0x7b4f14c15fa6 in sdm_sim_rcpp(SEXPREC*, SEXPREC*, SEXPREC*, Rcpp::Vector<14, Rcpp::PreserveStorage> const&, Rcpp::Vector<19, Rcpp::PreserveStorage> const&, int, bool, bool, double, bool) /data/gannet/ripley/R/packages/tests-gcc-SAN/bamm/src/sdm_sim.cpp:95 #6 0x7b4f14c35536 in _bamm_sdm_sim_rcpp /data/gannet/ripley/R/packages/tests-gcc-SAN/bamm/src/RcppExports.cpp:92 #7 0x00000074ee36 in R_doDotCall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:790 #8 0x000000753b8a in do_dotcall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:1437 #9 0x0000008ceba2 in bcEval_loop /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:8132 #10 0x0000008bbdeb in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7515 #11 0x00000085c642 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1167 #12 0x00000087238a in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2389 #13 0x00000087644a in applyClosure_core /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2302 #14 0x00000085cce3 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2324 #15 0x00000085cce3 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1280 #16 0x00000088abfe in do_set /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:3581 #17 0x00000085d106 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1232 #18 0x000000a02408 in Rf_ReplIteration /data/gannet/ripley/R/svn/R-devel/src/main/main.c:264 #19 0x000000a02408 in R_ReplConsole /data/gannet/ripley/R/svn/R-devel/src/main/main.c:317 #20 0x000000a1076a in run_Rmainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1235 #21 0x000000a10802 in Rf_mainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1242 #22 0x00000041317f in main /data/gannet/ripley/R/svn/R-devel/src/main/Rmain.c:29 #23 0x7f50bbe115f4 in __libc_start_call_main (/lib64/libc.so.6+0x35f4) (BuildId: a1dda014206b55b07f58fe8db80121b752dc3d03) #24 0x7f50bbe116a7 in __libc_start_main@@GLIBC_2.34 (/lib64/libc.so.6+0x36a7) (BuildId: a1dda014206b55b07f58fe8db80121b752dc3d03) #25 0x000000413b64 in _start (/data/gannet/ripley/R/gcc-SAN3/bin/exec/R+0x413b64) (BuildId: 4e8bbea85e436130e096aa95d2d82cd9ea57716c) [gannet:2328236:0:2328236] Caught signal 11 (Segmentation fault: address not mapped to object at address (nil)) ==== backtrace (tid:2328236) ==== 0 /lib64/libucs.so.0(ucs_debug_print_backtrace+0x2c) [0x7b509bdb12cc] 1 /lib64/libucs.so.0(ucs_handle_error+0x2e4) [0x7b509bdb2df4] 2 /lib64/libucs.so.0(+0x17aed) [0x7b509bdb4aed] 3 /lib64/libucs.so.0(+0x17cbd) [0x7b509bdb4cbd] 4 /lib64/libc.so.6(+0x8df09) [0x7f50bbe9bf09] 5 /data/gannet/ripley/R/packages/tests-gcc-SAN/bamm.Rcheck/bamm/libs/bamm.so(_Z12sdm_sim_rcppP7SEXPRECS0_S0_RKN4Rcpp6VectorILi14ENS1_15PreserveStorageEEERKNS2_ILi19ES3_EEibbdb+0x152f) [0x7b4f14cf2ddf] 6 /data/gannet/ripley/R/packages/tests-gcc-SAN/bamm.Rcheck/bamm/libs/bamm.so(_bamm_sdm_sim_rcpp+0x847) [0x7b4f14c35537] 7 /data/gannet/ripley/R/gcc-SAN3/bin/exec/R() [0x74ee37] 8 /data/gannet/ripley/R/gcc-SAN3/bin/exec/R() [0x753b8b] 9 /data/gannet/ripley/R/gcc-SAN3/bin/exec/R() [0x8ceba3] 10 /data/gannet/ripley/R/gcc-SAN3/bin/exec/R() [0x8bbdec] 11 /data/gannet/ripley/R/gcc-SAN3/bin/exec/R(Rf_eval+0x353) [0x85c643] 12 /data/gannet/ripley/R/gcc-SAN3/bin/exec/R() [0x87238b] 13 /data/gannet/ripley/R/gcc-SAN3/bin/exec/R() [0x87644b] 14 /data/gannet/ripley/R/gcc-SAN3/bin/exec/R(Rf_eval+0x9f4) [0x85cce4] 15 /data/gannet/ripley/R/gcc-SAN3/bin/exec/R() [0x88abff] 16 /data/gannet/ripley/R/gcc-SAN3/bin/exec/R(Rf_eval+0xe17) [0x85d107] 17 /data/gannet/ripley/R/gcc-SAN3/bin/exec/R() [0xa02409] 18 /data/gannet/ripley/R/gcc-SAN3/bin/exec/R(run_Rmainloop+0x8b) [0xa1076b] 19 /data/gannet/ripley/R/gcc-SAN3/bin/exec/R() [0xa10803] 20 /data/gannet/ripley/R/gcc-SAN3/bin/exec/R() [0x413180] 21 /lib64/libc.so.6(+0x35f5) [0x7f50bbe115f5] 22 /lib64/libc.so.6(__libc_start_main+0x88) [0x7f50bbe116a8] 23 /data/gannet/ripley/R/gcc-SAN3/bin/exec/R(_start+0x25) [0x413b65] ================================= *** caught segfault *** address 0x4d2002386ac, cause 'unknown' Traceback: 1: sdm_sim_rcpp(A = A_sparse, M_orig = M_adj, g0_input = initial_points, suit_values = suit_probs, adj_list = adj_list, nsteps = nsteps, stochastic_dispersal = stochastic_dispersal, disp_prop2_suitability = disp_prop2_suitability, disper_prop = disper_prop, progress_bar = progress_bar) 2: bamm::sdm_sim(set_A = sparse_mod, set_M = adj_mod, initial_points = occs_sparse, nsteps = 10) An irrecoverable exception occurred. R is aborting now ...