Learn R Programming

lattice (version 0.2-3)

shingles: shingles

Description

Functions to handle shingles

Usage

shingle(x, intervals=sort(unique(x)))
equal.count(x, ...)
as.shingle(x)
is.shingle(x)
## S3 method for class 'shingle':
plot(x, col)

Arguments

x
numeric variable or R object, shingle in plot.shingle
intervals
numeric vector or matrix with 2 columns
col
color to fill the rectangles, defaults to bar.fill$col
...
other arguments, passed to co.intervals

Value

  • logical for is.shingle, an object of class ``trellis'' for plot (printed by default by print.trellis), and an object of class ``shingle'' for the others.

Details

equal.count Converts x to a shingle. Essentially a wrapper around co.intervals. All arguments are passed to co.intervals

shingle creates a shingle using the given intervals. If intervels is a vector, these are used to form 0 length intervals.

as.shingle returns shingle(x) if x is not a shingle.

is.shingle tests whether x is a shingle.

plot.shingle displays the ranges of shingles via rectangles.

See Also

trellis.args, co.intervals, Lattice

Examples

Run this code
plot(equal.count(rnorm(100)))

Run the code above in your browser using DataLab