Functions to handle shingles
shingle(x, intervals=sort(unique(x))) equal.count(x, ...) as.shingle(x) is.shingle(x) ## S3 method for class 'shingle': plot((x, panel, xlab, ylab, ...)) ## S3 method for class 'shingle': print((x, showValues = TRUE, ...)) ## S3 method for class 'shingleLevel': as.character((x, ...)) ## S3 method for class 'shingleLevel': print((x, ...)) ## S3 method for class 'shingle': summary((object, showValues = FALSE, ...)) ## S3 method for class 'shingle': x[(subset, drop = FALSE) as.factorOrShingle(x, subset, drop)]
- numeric variable or R object, shingle in
x. An object (list of intervals) of class "shingleLevel" in
- shingle object to be summarized
- logical, whether to print the numeric part. If FALSE, only the intervals are printed
- numeric vector or matrix with 2 columns
- logical vector
- whether redundant shingle levels are to be dropped
- panel, xlab, ylab
- standard Trellis arguments (see
- other arguments, passed down as appropriate. For example, extra arguments to
equal.countare passed on to
co.intervals. graphical parameters can be passed as arguments to the
A shingle is a data structure used in Trellis, and is a generalization of factors to ‘continuous’ variables. It consists of a numeric vector along with some possibly overlapping intervals. These intervals are the ‘levels’ of the shingle. The
nlevels functions, usually applicable to factors, also work on shingles. The implementation of shingles is slightly different from S.
There are print methods for shingles, as well as for printing the result of
levels() applied to a shingle. For use in labelling, the
as.character method can be used to convert levels of a shingle to character strings.
is.shingle tests whether
x is a shingle.
plot.shingle displays the ranges of shingles via rectangles.
summary.shingle describe the shingle object.
Documentation reproduced from package lattice, version 0.20-33. License: GPL (>= 2)