Description Usage Arguments Value Author(s) References See Also Examples
NBModel
is a function to fit Spatial Naive Bayes Model.
1 2 |
points |
A |
map |
A |
target |
|
fac.lap |
|
isgrid |
logical ( |
contain |
Character ( |
... |
Arguments pass to |
NBModel
: An object of class SpNaBaModel
.
Enrique Del Callejo Canal (edelcallejoc@gmail.com), based on implemented algortihms in web platform SPECIES (see References).
http://species.conabio.gob.mx/
SpNaBaMatrix-class
, SpNaBaCounts
,
SpNaBaProbs
, SpNaBa-methods
,
SpNaBaEps
, epsilon
,
SpNaBaScore
, score
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # Using the function id_pts() for spatial data --------
library(sp)
library(rgeos)
library(rgdal)
library(raster)
# Loading data
data(Mex0)
data(mammals)
# Using an SpatialPointsDataFrame and
# SpatialPolygonsDataFrame object
x.model <- NBModel(mammals, Mex0, target = 1:10, fac.lap = 0.01)
# Using an SpNaBaMAtrix object
# Grid
Mex0.grd<-grd_build(Mex0)
# Identification points of mammals
x.mat<-id_pts(grd = Mex0.grd, pts = mammals)
x.model <- NBModel(x.mat, target = 1:10, fac.lap = 0.01)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.