groupedHeatmap          package:geneplotter          R Documentation

_H_e_a_t_m_a_p _o_f _a _m_a_t_r_i_x _w_i_t_h _g_r_o_u_p_e_d _r_o_w_s _a_n_d _c_o_l_u_m_n_s

_D_e_s_c_r_i_p_t_i_o_n:

     The function uses 'grid.rect' and 'grid.rect' to draw a heatmap
     with grouped rows and columns.

_U_s_a_g_e:

     groupedHeatmap(z, frow, fcol,
       fillcolours = c("#2166ac","#4393c3","#92c5de","#d1e5f0","#fefefe","#fddbc7","#f4a582","#d6604d","#b2182b"),
       bordercolour = "#e0e0e0",
       zlim = range(z, na.rm=TRUE))

_A_r_g_u_m_e_n_t_s:

       z: A matrix with row and column names.

    frow: A 'factor' of length 'nrow(z)' indicating the row grouping.

    fcol: A 'factor' of length 'ncol(z)' indicating the column
          grouping.

fillcolours: A 'character' vector of colours from which the colour map
          is obtained through interpolation.

bordercolour: Either a 'character' vector of length 1, specifying the
          border colour of the heatmap tiles, or 'NULL' or 'NA', which
          indicates that the border colour should match the fill
          colour.

    zlim: Lower and upper limit of 'z' values represented in the colour
          map.

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

     The function can be called within other drawing operations from
     the grid package, e.g. within a viewport.

_V_a_l_u_e:

     The function is called for its side effect, drawing text and
     rectangles on the current viewport.

_A_u_t_h_o_r(_s):

     Wolfgang Huber <URL: http://www.ebi.ac.uk/huber>

_S_e_e _A_l_s_o:

     'grid.text', 'grid.rect'

_E_x_a_m_p_l_e_s:

     data("mtcars")

     groupedHeatmap(
       scale(mtcars),
       frow = factor(sapply(strsplit(rownames(mtcars), " "), "[", 1)),
       fcol = factor(round(seq_len(ncol(mtcars))/3)))

