hist.lengths {spMC}R Documentation

Histograms of Stratum Lengths for Each Observed Category

Description

The function compute the histograms of the stratum lengths for each category. If plot = TRUE, the resulting object of class hist.lengths is plotted before it is returned.

Usage

## S3 method for class 'lengths'
hist(x, ..., log = FALSE, zeros.rm = TRUE)

Arguments

x

an object of the class lengths, typically with the output of the function getlen.

...

further arguments to pass to the function hist.

log

a logical value. If TRUE, histograms will be calculated for the logarithm of the lengths. It is FALSE by default.

zeros.rm

a logical value. If FALSE, histograms will be computed by including zero values. It is TRUE by default.

Value

If plot = TRUE, an image is produced on the current graphics device. The function returns an object of class hist.lengths. It contains class histogram objects, the given direction of the stratum lengths and a logical value which points out if histograms are computed for the logarithm of stratum lengths.

Author(s)

Luca Sartore drwolf85@gmail.com

See Also

getlen, hist, density.lengths, plot.density.lengths

Examples


data(ACM)
direction <- c(0,0,1)
     
# Compute the appertaining directional line for each location
loc.id <- which_lines(ACM[, 1:3], direction)
     
# Estimate stratum lengths
gl <- getlen(ACM$MAT3, ACM[, 1:3], loc.id, direction)

# Plot the histograms
hist(gl)

[Package spMC version 0.3.15 Index]