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, 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)

_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

intervals: numeric vector or matrix with 2 columns

  subset: logical vector

    drop: whether redundant shingle levels are to be dropped

panel, xlab, ylab: standard Trellis arguments (see 'xyplot' ) 

     ...: other arguments, passed down as appropriate.  For example,
          extra arguments to 'equal.count' are passed on to
          'co.intervals'.  graphical parameters can be passed as
          arguments to the 'plot' method. 

_D_e_t_a_i_l_s:

     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
     'levels' and '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.

     'equal.count' converts 'x' to a shingle using the equal count
     algorithm.  This is essentially a wrapper around 'co.intervals'. 
     All arguments are passed to 'co.intervals'.

     'shingle' creates a shingle using the given 'intervals'. If
     'intervals' 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))

