Description Usage Arguments Examples
Calculate the optimal bandwidth or bootstrap the bandwidth selection for lage datasets.
| 1 2 | 
| points | A two column data frame in the form (lon,lat) or (x,y) | 
| dist.method | Haversine or Pythagorean distance implemented. | 
| boot.n | Number of bootstrap replicates to do. If set, will do bootstrap even on small datasets. Default 1000. | 
| sam.size | Bootstrap sample size. | 
| maxram | Maximum RAM, in Gigabytes. | 
| 1 2 3 4 5 6 7 8 9 10 | require(raster)
grid = raster::raster(nrows=18, ncols=36, xmn=-180, xmx=180, ymn=-90, ymx=90, vals=NULL)
grid = raster::setValues(grid,values=(as.vector(seq(1:raster::ncell(grid)))))
points = cbind(
      c(seq(xmin(grid), xmax(grid), length.out=1000), 
               seq(xmax(grid), xmin(grid), length.out=1000)), 
      c(seq(ymin(grid), ymax(grid), length.out=1000), 
               seq(ymin(grid), ymax(grid), length.out=1000))
               )
bandwidth = bw.calc(points);
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.