shingles               package:lattice               R Documentation

_s_h_i_n_g_l_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Functions to handle shingles

_U_s_a_g_e:

     shingle(x, intervals=sort(unique(x)))
     equal.count(x, ...)
     as.shingle(x)
     is.shingle(x)
     ## S3 method for class 'shingle':
     plot(x, col, aspect, ...)
     ## S3 method for class 'shingle':
     print(x, showValues = TRUE, ...)
     ## S3 method for class 'shingleLevel':
     print(x, ...)
     ## S3 method for class 'shingle':
     summary(object, ...)
     ## S3 method for class 'shingle':
     as.data.frame(x, row.names = NULL, optional = FALSE)
     ## S3 method for class 'shingle':
     x[subset, drop = FALSE]
     as.factorOrShingle(x, subset, drop)

_A_r_g_u_m_e_n_t_s:

       x: numeric variable or R object, shingle in 'plot.shingle' and
          'x[]'. An object (list of intervals) of class "shingleLevel"
          in 'print.shingleLevel' 

  object: shingle object to be summarized

showValues: logical, whether to print the numeric part. If FALSE, only
          the intervals are printed

row.names: a character vector giving the row names for the data frame

optional: logical. If `TRUE', setting row names is optional

intervals: numeric vector or matrix with 2 columns

  subset: logical vector

    drop: whether redundant shingle levels are to be dropped

     col: color to fill the rectangles, defaults to 'bar.fill$col'

  aspect: aspect ratio

     ...: other arguments, passed to 'co.intervals'

_D_e_t_a_i_l_s:

     A shingle is a data structure used in Trellis, and is meant to be
     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
     'levels' and 'nlevels' functions, usually applicable to factors,
     are also applicable to shingles.

     There are print methods for shingles, as well as for printing the
     result of 'levels()' applied to a shingle.

     The implementation of shingles is slightly different from S.

     '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.
     'print.shingle' and 'summary.shingle' describe the shingle object.

_V_a_l_u_e:

     'x$intervals' for 'levels.shingle(x)',  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.

_A_u_t_h_o_r(_s):

     Deepayan Sarkar Deepayan.Sarkar@R-project.org

_S_e_e _A_l_s_o:

     'xyplot', 'co.intervals', 'Lattice'

_E_x_a_m_p_l_e_s:

     z <- equal.count(rnorm(50))
     plot(z)
     print(z)
     print(levels(z))

