updateSpread             package:iSPlot             R Documentation

_U_p_d_a_t_e _a_n_y _V_i_e_w_s _t_h_a_t _a_r_e _S_p_r_e_a_d_s_h_e_e_t_s

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

     updateSpread is called by the handleMessage method for a 
     gUpdateViewMessage object.  If only certain rows need to be
     updated in the spreadsheet, then the updated information will be
     placed in only those rows.  Otherwise, the whole spreadsheet is
     redrawn.  To tell if only certain rows need to be updated,
     updateSpread looks at the length of the data parameter.  data is
     expected to be a list with a Rname element, that pertains to row
     names or indices that need  to be updated.  data will be a list of
     length zero if the whole  spreadsheet should be redrawn.

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

     updateSpread(curDataName, spreadIndex, data)

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

curDataName: the data set name 

spreadIndex: the index of the spreadsheet in viewList that needs to be
          updated - only one spreadsheet can be updated at a time
          because each data set can only be represented in one
          spreadsheet 

    data: a list of length zero if the spreadsheet should be redrawn or
          a list with a Rname element to indicate which rows should be
          updated 

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

     Elizabeth Whalen

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

     'gUpdateViewMessage-class', 'getRowDataFromDF', 'createView'

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

       if (interactive())
       {
         createControlWindow()
         # should load data through Open Data or Open File under the File menu
         data(USArrests)
         loadDFData(USArrests,"USArrests")
         # creating a spreadsheet should occur through View Data under 
         # the Display menu
         createView(type = "spreadView", dataName = "USArrests") 
         # should set the view mode using the View Mode menu
         setHighlightMode()            
         # now click on a row in the spreadsheet and that will cause 
         # updateSpread to be called - you can tell it was called because the 
         # data and thus, the spreadsheet will change  
       }

