densplot: Plot PDF curve of given type and variable for single density...

Description Usage Arguments Examples

View source: R/cracle_build.R

Description

Using an object from the densform() function. Plot a single PDF curve in a new plot window.

Usage

1
2
densplot(dens.ob, var, col = sample(grDevices::colours()), type = ".kde",
  w = FALSE)

Arguments

dens.ob

An object derived from the vegdistmod::dens_ob() function.

var

A character string that matches one of the layer names in the source raster object.

col

A color declaration. Default is a random color.

type

A character string of value either ".kde" for a Kernel Density Estimator curve, or ".gauss" for a Gaussian (normal) curve. All other values will result in errors.

w

TRUE or FALSE to show weighted probability functions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
#distr <- read.table('test_mat.txt', head=T, sep ="\t");
#OR:
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 = 512);
densplot(dens.sub, names(climondbioclim[[1]]));

## End(Not run)

rsh249/vegdistmod documentation built on May 28, 2019, 3:31 a.m.