removeIndividual         package:GeneticsPed         R Documentation

_R_e_m_o_v_e _i_n_d_i_v_i_d_u_a_l _f_r_o_m _p_e_d_i_g_r_e_e

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

     'removeIndividual' provides utility for removing individuals from
     a pedigree.

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

     removeIndividual(x, individual, remove="all")

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

       x: pedigree

individual: vector of individuals

  remove: character, column names of id columns and/or "all", see
          details

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

     Individuals passed to argument 'individual' will be removed from
     the pedigree. If there is a pedigree with individual "id" and two
     ascendants, say "father" and "mother", then one can pass any
     combination of these three id columns or "all" for all of them in
     short to argument 'remove'. In case only "id" is passed to
     'remove', individuals will be removed from the pedigree, but not
     from ascendant id columns, which might be a matter of interest
     only if specified individuals show up as ascendants for some other
     individuals. In case you want to remove an individual completely
     from the pedigree "all" must be used.

     Individuals in id column are removed via removal of the whole
     record from the pedigree. Individuals in ascendant id columns are
     only replaced by 'attr(x, "unknown")'.

     If founder is removed, attribute extended status is changed to
     FALSE.

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

     Gregor Gorjanc

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

     'Pedigree'

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

       ped <- generatePedigree(3)
       summary(ped)
       removeIndividual(ped, individual=c(1, 3, 4), remove="father")
       removeIndividual(ped, individual=c(1, 3, 4), remove=c("mother", "father"))
       (ped <- removeIndividual(ped, individual=c(1, 3, 4), remove=c("all")))
       summary(ped)

