gdf                 package:gWidgets                 R Documentation

_C_o_n_s_t_r_u_c_t_o_r _o_f _w_i_d_g_e_t _t_o _e_d_i_t _a _d_a_t_a _f_r_a_m_e

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

     A widget used to edit data frames

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

     gdf(items = NULL, name = deparse(substitute(items)), do.subset = FALSE,
     container = NULL, ...,toolkit = guiToolkit())

     gdfnotebook(items = NULL, container = NULL, ..., toolkit=guiToolkit()) 

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

   items: data frame to be edited

    name: Name of data frame

do.subset: A logical. If 'TRUE' a means to filter the output using
          logical values is given.

container: An optional container to attach widget to

     ...: Can be used to overide default colors.

 toolkit: Which GUI toolkit to use

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

     This widget is similar to that provided by 'gtable' only this is
     intended for editing of data frames. The 'gdfnotebook' widget uses
     a notebook to hold several data frames at once.

     In gWidgetsRGtk2, the table shown can be edited. Double click in a
     cell to allow this. When editing, the value is saved when the cell
     is left. This is done using the up or down arrow keys, the Enter
     key, the Tab key or the mouse. The down arrow key moves the cursor
     down a row, extending the size of the data frame if necessary. The
     Enter key moves the cursor down, but does not extend the data
     frame if at the bottom. The Tab key moves to the right. If at the
     end, a dialog to add a new variable pops up.

     Right clicking in a cell that is not currently being edited pops
     up a menu to edit the colum names, sort or apply a function to a
     row.

     If 'do.subset=TRUE' then one can filter using subsetting  by a
     single variable. The variable may be selected by a droplist, the
     logical expression can be entered or one selected from a droplist.

     If more complicated filtering is desired, the 'visible<-' method
     may be used, its value should a logical vector of length given by
     the number of rows of the data frame.

     The 'svalue' method returns the selected value.

     The 'svalue<-' method is used to select rows without a moust, the
     value is a set of row numbers.

     The '"["' method is used for data-frame like extraction from the
     object.

     The code{"[<-"} method can be used for data-frame like assignment,
     with limitations.

     The 'dim', 'dimnames', 'dimnames<-', 'length', 'names' , and
     'names<-' methods should work on the object as they do for data
     frames.

     The 'addhandlerchanged' handler responds to changes in the values
     of the data frame.

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

     'gtable'

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

     ## Not run: 
             obj = gdf(mtcars, container=gwindow("mtcars"), do.subset=TRUE)
             obj[1,1]
             obj[1,]
             obj[,1]
     ## End(Not run)

