model.frame               package:base               R Documentation

_E_x_t_r_a_c_t_i_n_g _t_h_e ``_E_n_v_i_r_o_n_m_e_n_t'' _o_f _a _M_o_d_e_l _F_o_r_m_u_l_a

_D_e_s_c_r_i_p_t_i_o_n:

     `model.frame' (generic function) and its methods return a
     `data.frame' with the variables from `formula'.

_U_s_a_g_e:

     model.frame(formula, ...)
     model.frame.default(formula, data = parent.frame(),
                         subset = NULL, na.action,
                         drop.unused.levels = FALSE, xlev = NULL, ...)

     Methods for
             lm      glm     aovlist

_A_r_g_u_m_e_n_t_s:

 formula: a model formula

    data: `data.frame', list, `environment' or object coercible to
          `data.frame' containing the variables in `formula'.

  subset: a specification of the rows to be used. Defaults to all rows.

na.action: how `NA's are treated. The default is first, any `na.action'
          attribute of `data', second a `na.action' setting of
          `options', and third `na.fail' if that is unset.  The
          ``factory-fresh'' default is `na.omit'.

drop.unused.levels: should factors have unused levels dropped? Defaults
          to `FALSE'.

    xlev: a named list of character vectors giving the full set of
          levels to be assumed for each factor.

     ...: further arguments such as `subset', `offset' and `weights'.
          `NULL' arguments are treated as missing.

_V_a_l_u_e:

     A `data.frame' containing the variables used in `formula'.

_S_e_e _A_l_s_o:

     `model.matrix' for the ``design matrix'', `formula' for formulas 
     and `expand.model.frame' for model.frame manipulation.

_E_x_a_m_p_l_e_s:

     data(cars)
     data.class(model.frame(dist ~ speed, data = cars))

