Description Usage Arguments Examples
This function takes extracted climate data (from an object generated by the cRacle::extraction() function) for one taxon/species and generates probability density functions for variable using both a Gaussian (normal) approximation and a Gaussian Kernel Density estimator.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
ex |
An object derived from the extraction() function. |
clim |
A raster object (see raster::raster() and raster::stack() documentation for reading raster files into R). |
name |
A character string describing (preferably) the group for which PDFs are being constructed (i.e., a species binomial). If none is supplied, a value of column "tax" is selected as a default. |
bw |
A bandwidth compatible with stats::density(). Options include "nrd", "nrd0", "ucv", "bcv", etc.. Default (and recommended) value is "nrd0". |
kern |
Type of Kernel to smooth with. Recommend 'gaussian', 'optcosine', or 'epanechnikov'. See: stats::density for options. |
manip |
Character string of 'reg' for intersectional likelihood, 'condi' for conditional likelihood statement. |
n |
Number of equally spaced points at which the probability density is to be estimated. Defaults to 1024. A lower number increases speed but decreases resolution in the function. A higher number increases resolution at the cost of speed. Recommended values: 512, 1024, 2048, .... |
from |
vector of starting points by variable. Default is the variable layer minimum. |
to |
vector of ending points by variable. Default is the variable layer maximum. |
clip |
A character string of value "range" or "95conf" or "99conf". Should the probability functions be clipped to either the empirical range or the 95 or 99 percent confidence interval? |
bg.n |
If manip = 'condi'. How many background points PER OCCURRENCE record should be sampled. Default is 1000. |
bg |
Optionally send a matrix of an extraction object to use as the background sample. |
1 2 3 4 5 6 7 8 9 10 | ## Not run:
#distr <- read.table('test_mat.txt', head=T, sep ="\t");
data(distr);
data(climondbioclim);
extr.raw = extraction(data=distr, clim= climondbioclim, schema='raw');
extr.sub = subset(extr.raw, extr.raw$tax == extr.raw[5,'tax']);
dens.sub = densform(extr.sub, clim = climondbioclim, bw = 'nrd0', n = 128, bg.n=25);
densplot(dens.sub, names(climondbioclim[[1]]));
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.