lattice-methods           package:flowViz           R Documentation

_M_e_t_h_o_d_s _i_m_p_l_e_m_e_n_t_i_n_g _L_a_t_t_i_c_e _d_i_s_p_l_a_y_s _f_o_r _f_l_o_w _d_a_t_a

_D_e_s_c_r_i_p_t_i_o_n:

     Various methods implementing multipanel visualizations for flow
     data using infrastructure provided in the lattice package.  The
     original generics for these methods are defined in lattice, and
     these S4 methods (mostly) dispatch on a formula and the 'data'
     argument which must be of class 'flowSet' or 'flowFrame'.  The
     formula has to be fairly basic: conditioning can be done using
     phenodata variables and channel names (the 'colnames' slot) can be
     used as panel variables. See examples below for sample usage.

_U_s_a_g_e:

     ## methods for 'flowSet' objects
     ## S4 method for signature 'formula, flowSet':
     qqmath(
         x,
         data,
         xlab,
         ylab,
         f.value = function(n) ppoints(ceiling(sqrt(n))),
         distribution = qnorm,
         ...)

     ## S4 method for signature 'formula, flowSet':
     levelplot(
         x,
         data,
         xlab,
         ylab,
         as.table = TRUE,
         contour = TRUE,
         labels = FALSE,
         n = 50,
         ...)

     ## methods for 'flowFrame' objects
     ## S4 method for signature 'flowFrame, missing':
     parallel(
         x,
         data, 
         reorder.by = function(x) var(x, na.rm = TRUE),
         time = "Time",
         exclude.time = TRUE,
         ...)

_A_r_g_u_m_e_n_t_s:

       x: a formula describing the structure of the plot and the
          variables to be used in the display. 

    data: a 'flowSet' object that serves as a source of data. 

xlab, ylab: Labels for data axes, with suitable defaults taken from the
          formula 

f.value, distribution: number of points used in Q-Q plot, and the
          reference distribution used.  See 'qqmath' for details.  

       n: the number of bins on each axis to be used when evaluating
          the density 

as.table, contour, labels: These arguments are passed unchanged to the
          corresponding methods in lattice, and are listed here only
          because they provide different defaults.  See documentation
          for the original methods for details.

    time: A character string giving the name of the column recording
          time. 

exclude.time: logical, specifying whether to exclude the time variable
          from a scatter plot matrix or parallel coordinates plot. It
          is rarely meaningful not to do so. 

reorder.by: a function, which is applied to each column.  The columns
          are ordered by the results.  Reordering can be suppressed by
          setting this to 'NULL'.  

     ...: more arguments, usually passed on to the underlying lattice
          methods. 

_D_e_t_a_i_l_s:

     Not all standard lattice arguments will have the intended effect,
     but many should.  For a fuller description of possible arguments
     and their effects, consult documentation on lattice (Trellis docs
     would also work for the fundamentals).

_M_e_t_h_o_d_s:



     _q_q_m_a_t_h 'signature(x = "formula", data = "flowSet")': creates
          theoretical quantile plots of a given channel, with one or
          more samples per panel


     _l_e_v_e_l_p_l_o_t 'signature(x = "formula", data = "flowSet")': similar to
          the 'xyplot' method, but plots estimated density (using
          'kde2d') with a common z-scale and an optional color key.


     _p_a_r_a_l_l_e_l 'signature(x = "flowFrame", data = "missing")': draws a
          parallel coordinates plot of all channels (excluding time, by
          default) of a 'flowFrame' object.  This is rarely useful
          without transparency, but that is currently only possible
          with the 'pdf' device (and perhaps the aqua device as well).


_E_x_a_m_p_l_e_s:

     data(GvHD)

     qqmath( ~ `FSC-H` | factor(Patient), GvHD,
            grid = TRUE, type = "l",
            f.value = ppoints(100))

     ## contourplot of bivariate density:

     require(colorspace)
     YlOrBr <- c("#FFFFD4", "#FED98E", "#FE9929", "#D95F0E", "#993404")
     colori <- colorRampPalette(YlOrBr)
     levelplot(asinh(`SSC-H`) ~ asinh(`FSC-H`) | Visit + Patient, GvHD, n = 20,
               col.regions = colori(50), main = "Contour Plot")


     ## parallel coordinate plots

     parallel(GvHD[["s6a01"]])

     ## Not run: 

     ## try with PDF device
     parallel(GvHD[["s7a01"]], alpha = 0.01)

     ## End(Not run)

