besthint               package:kinship               R Documentation

_C_r_e_a_t_e _a _h_i_n_t_s _m_a_t_r_i_x _f_o_r _a _p_e_d_i_g_r_e_e.

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

     A pedigree structure can contain a 'hints' matrix which helps to
     reorder the pedigree (e.g. left-to-right order of children within
     family) so as to plot with minimal distortion. This routine trys
     out a large number of configurations, finding the best by brute
     force.

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

     besthint(ped, wt=c(1000, 10, 1), tolerance=0)

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

     ped: a pedigree object 

      wt: relative weights for three types of "distortion" in a plotted
          pedigree. The final score for a pedigree is the weighted sum
          of these; the lowest score is considered the best. The three
          components are 1: the number of dotted lines, connecting two
          instances of the same person; 2: the lengths of those dotted
          lines; and 3: the horizontal offsets between parent/child
          pairs. 

tolerance: the threshold for acceptance.   If any of the orderings that
          are attempted have a score that is less than or equal to this
          value, the routine ceases searching for a better one. 

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

     Assume that a pedigree has k founding couples, i.e., husband-wife
     pairs for which neither has a parent in the pedigree. The routine
     tries all k!/2 possible left to right orderings of the founders
     (in random order), uses the 'autohint' function to optimize the
     order of children within each family, and computes a score. The
     hints matrix for the first pedigree to match the tolerance level
     is returned, or that for the best score found if none match the
     tolerance.

_V_a_l_u_e:

     a hints matrix

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

     'pedigree, plot.pedigree, autohint'

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

     ## Not run: 
     # Find a good plot, only trying to avoid dotted connectors
     myped$hints <- besthint(myped, wt=c(1000,100,0))
     ## End(Not run)

