spatialLayout           package:arrayMagic           R Documentation

_C_a_l_c_u_l_a_t_i_o_n _o_f _t_w_o _d_i_m_e_n_s_i_o_n_a_l _c_o_o_r_d_i_n_a_t_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     All 'value's are mapped on a matrix representing the the spatial
     layout defined by the function arguments, mainly by 'row',
     'column' and 'block'. The result can be  visualised with the
     function 'plot.imageMatrix'.

_U_s_a_g_e:

     spatialLayout(value, row, col, block, numberOfValues, nrOfBlocksPerRow = 4, mapping = 0, nrRow, nrCol)

_A_r_g_u_m_e_n_t_s:

   value: numeric vector; required; default: missing

     row: integer vector; required; default: missing

     col: integer vector; required; default: missing

   block: integer vector; required; default: missing

numberOfValues: integer; optional; default: missing. The argument
          'numberOfValues' may be used  if not all values for all
          coordinates are passed to the function. An additional
          consistency check is offered.

nrOfBlocksPerRow: integer; required; default: 4. Useful if there is a
          block structured layout with columns and rows assigned within
          each block as common for microarrays. See examples for a
          simple case with only one block.

 mapping: integer; either zero or one; default: zero, Mapping toggles
          between counting blocks "by row" or "by column". Zero
          corresponds to "ScanAlyze" and "GenePix", i.e. counting
          blocks "by row".

   nrRow: integer; optional; default: missing. The argument 'nrRow'
          (number of rows per block) may be used to supersede
          'max(row)' which is calculated automatically.

   nrCol: integer; optional; default: missing. The argument 'nrCol'
          (number of columns per block)  may be used to supersede
          'max(col)' which is calculated automatically.

_V_a_l_u_e:

     A matrix representing the spatial layout of all 'value's. The
     matrix is labelled as class 'imageMatrix' and 'matrix'.

_A_u_t_h_o_r(_s):

     Andreas Buness <a.buness@dkfz.de>

_S_e_e _A_l_s_o:

     'plot.imageMatrix'

_E_x_a_m_p_l_e_s:

      value <- rep(c(1,rep(0,49)),10)
      block <- as.integer(gl(10,50))
      col <- rep(c(1:10),50)
      row <- rep(as.integer(gl(5,10)),10)
      sL <- spatialLayout(value=value,row=row,col=col,block=block,nrOfBlocksPerRow=2)
      plot.imageMatrix(sL)
      value <- value[-(201:250)]
      block <- block[-(201:250)]
      col <- col[-(201:250)]
      row <- row[-(201:250)]
      sL <- spatialLayout(value=value,row=row,col=col,block=block,nrOfBlocksPerRow=2,numberOfValues=500)
      plot.imageMatrix(sL)

      value <- 1:200
      block <- rep(1, 200)
      col <- rep(1:20, 10)
      row <- as.integer(gl(10,20))
      sLOne <- spatialLayout(value=value,block=block,col=col,row=row,nrOfBlocksPerRow=1)
             

