edit.data.frame             package:base             R Documentation

_E_d_i_t _D_a_t_a _F_r_a_m_e_s _a_n_d _M_a_t_r_i_c_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Use data editor on data frame or matrix contents.

_U_s_a_g_e:

     edit.data.frame(name, factor.mode=c("numeric", "character"),
                     edit.row.names = any(row.names(name) != 1:nrow(name)),
                     ...)
     edit.matrix(name, edit.row.names = any(rownames(name)))

_A_r_g_u_m_e_n_t_s:

    name: A data frame or matrix.

factor.mode: How to handle factors (as integers or using character
          levels).

edit.row.names: logical. Show the row names be displayed as a separate
          editable column?

_D_e_t_a_i_l_s:

     At present, this only works on simple data frames containing
     numeric or character vectors and factors. Factors are represented
     in the spreadsheet as either numeric vectors (which is more
     suitable for data entry) or character vectors (better for
     browsing). After editing, vectors are padded with `NA' to have the
     same length and factor attributes are restored. The set of factor
     levels can not be changed by editing in numeric mode; invalid
     levels are changed to `NA' and a warning is issued.  If new factor
     levels are introduced in character mode, they are added at the end
     of the list of levels in the order in which they encountered.

_V_a_l_u_e:

     The edited data frame.

_N_o_t_e:

     `fix(dataframe)' works for in-place editing by calling this
     function.

     If the data editor is not available, a dump of the object is
     presented for editing using the default method of `edit'.

_A_u_t_h_o_r(_s):

     Peter Dalgaard

_S_e_e _A_l_s_o:

     `data.entry', `edit'

_E_x_a_m_p_l_e_s:

     data(InsectSprays)
     edit(InsectSprays)
     edit(InsectSprays, factor.mode="numeric")

