Functions to handle shingles
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
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
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
whether redundant shingle levels are to be dropped
standard Trellis arguments (see
other arguments, passed down as appropriate. For
example, extra arguments to
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
There are print methods for shingles, as well as for printing the
levels() applied to a shingle. For use in labelling,
as.character method can be used to convert levels of a
shingle to character strings.
x to a shingle using the equal
count algorithm. This is essentially a wrapper around
co.intervals. All arguments are passed to
shingle creates a shingle using the given
intervals is a vector, these are used to form 0 length
x is not a
is.shingle tests whether
x is a shingle.
plot.shingle displays the ranges of shingles via
the shingle object.
is.shingle, an object of class
plot (printed by default by
an object of class
"shingle" for the others.
Deepayan Sarkar [email protected]
1 2 3 4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.