Learn R Programming

spMC (version 0.3.15)

boxplot.lengths: Stratum Lengths Boxplot

Description

Produce box-and-whisker plots of the stratum lengths.

Usage

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

Value

An image is produced on the current graphics device. The function returns a list with the following components:

stats

a matrix containing the values used to plot the box-and-whisker plots.

n

a vector with the number of observations for each category.

conf

a matrix containing further values to draw the lower and upper extremes of the notch.

out

a vectors with the values of the outlier points.

group

a vector whose elements indicate to which category the outlier belongs.

names

a character vector with the names of each category.

Arguments

x

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

...

other arguments to pass to the function boxplot.

log

a logical value. If TRUE, the logarithm of the stratum lengths will be plotted. It is FALSE by default.

zeros.rm

a logical value. If FALSE, the box-and-whisker will be drawn by including zero values. It is TRUE by default.

Author

Luca Sartore drwolf85@gmail.com

Details

The box-and-whisker plots give some information about the distribution of the stratum lengths for the observed categories along a given direction.

See Also

plot.lengths, boxplot, getlen

Examples

Run this code
# \donttest{
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)

# Make the boxplot of the object gl
par(mfrow = c(1, 1))
boxplot(gl)
# }

Run the code above in your browser using DataLab