asGraphProperty            package:graph            R Documentation

_G_e_n_e_r_i_c _f_o_r _c_o_n_v_e_r_t_i_n_g _i_n_p_u_t _t_o _g_r_a_p_h _p_r_o_p_e_r_t_y _l_i_s_t

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

     This is a generic that returns converts its input to a value
     suitable for the 'property' slot of the 'propertyHolder-class'
     virtual class.

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

     asGraphProperty(x, hasWeight)

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

       x: 

hasWeight: 'TRUE' or 'FALSE' indicating that the property list must
          have an element named "weight"

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

     If 'x' is a list, then all of its elements must be named. If it is
     a numeric vector, it is converted to a list (using 'as.list'). If
     it is originally numeric, is of length one and has no names then
     it is converted to a list with a single element named "weight".

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

     A named list.

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

     Saikat DebRoy

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

     'propertyHolder-class'

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

     asGraphProperty(2.0, hasWeight=TRUE)
     asGraphProperty(c(a=1, b=2))

