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' and 'numberOfValues' if not all values for
     all coordinates are given. 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)

_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' allows to determine the correct spatial
          layout if not all values for all coordinates are passed to
          the function.

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, which corresponds
          to "ScanAlyze" and "GenePix"; cf. source code

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

