nIndividual           package:GeneticsPed           R Documentation

_N_u_m_b_e_r _o_f _i_n_d_i_v_i_d_u_a_l_s _i_n _a _p_e_d_i_g_r_e_e

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

     'nIndividual' returns number of individuals (individuals and/or
     ascendants) in a pedigree object.

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

     nIndividual(x, col=NULL, extend=TRUE, drop=TRUE)

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

       x: pedigree

     col: character, which id column should be the source: "id"
          (default) or particular ascendant i.e. "father" and "mother"

  extend: logical, extend pedigree

    drop: logical, drop unused levels in case factors are used

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

     FIXME - this will change a lot!!!! There is always one additional
     level in levels in case factors are used to represent individuals
     in a pedigree as described in 'Pedigree'. However,
     'nlevels.Pedigree' prints out the number of levels actually used
     to represent individuals i.e. level unknown is not included into
     the result.

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

     Gregor Gorjanc

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

     'summary.Pedigree', 'extend'

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

       # Deafult example
       ped <- generatePedigree(5)
       nIndividual(ped)

       # Other id columns
       nIndividual(ped, col="father")
       nIndividual(ped, col="mother")

       # Remove individuals with unknown fathers - FIXME
       # ped <- ped[!is.na(ped, col="father"), ]
       # nIndividual(ped)
       # nIndividual(ped, extend=FALSE)

