detectReplicas          package:arrayMagic          R Documentation

_d_e_t_e_c_t_R_e_p_l_i_c_a_s

_D_e_s_c_r_i_p_t_i_o_n:

     The function returns for each unique item all corresponding
     indexes.

_U_s_a_g_e:

     detectReplicas(arrayDescription, spotIdentifier = "ID", identifiersToBeSkipped = "Blank")

_A_r_g_u_m_e_n_t_s:

arrayDescription: an object of class 'data.frame' which contains a
          column named as 'spotIdentifier'; required; default missing 

spotIdentifier: character string; required; default: "ID"

identifiersToBeSkipped: vector of character strings; required; default:
          "Blank"; items of the column 'spotIdentifier' for which no
          replica detection takes place

_V_a_l_u_e:

     A list which contains 'nrOfReplicas' and 'spotReplicas'. 
     'nrOfReplicas': one integer characterizing the number of spot
     replicas given for each identifier if existing or otherwise  'NA'.
     'spotReplicas': a list of the length of the unique identifiers
     where each element contains a vector of indexes corresponding to
     the given identifier (i.e. the name of the list element) otherwise
     'NA'.

_A_u_t_h_o_r(_s):

     Andreas Buness <a.buness@dkfz.de>

_E_x_a_m_p_l_e_s:

     aD <- data.frame(ID=c("z", "x", "x", "x", "y", "z", "z", "y", "y"))
     re <- detectReplicas(aD, identifiersToBeSkipped = c("Blank", "Control1", "Control2"))
     stopifnot(re[["nrOfReplicas"]] == 3 )

     aD <- data.frame(ID=c("Blank", "Control1", "Blank", "Control2"))
     re <- detectReplicas(aD, identifiersToBeSkipped = c("Blank", "Control1", "Control2"))
     stopifnot(is.na(re[["nrOfReplicas"]]))

      
       

