getRowDataFromDF {iSPlot} | R Documentation

## Return certain rows and their indices from a dataframe

### Description

getRowDataFromDF returns only certain rows and their indices from a dataframe. This function is useful when wanting to return information from a dataframe that just had a few rows changed. It is called by the function, updateSpread, when only a few rows in the spreadsheet need to be updated.

### Usage

    getRowDataFromDF(dfName, data)

### Arguments

`dfName` | the name of the dataframe
`data` | data is a list with an element called, Rname, that indicates which rows to return

### Value

`rowIndex` | the indices of the rows in the dataframe
`rowData` | a subset of the dataframe that only includes the changed rows

### Author(s)

Elizabeth Whalen

### See Also

`getData`, `updateSpread`

### Examples

      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 to highlight using the View Mode menu
        setHighlightMode()
        # now click on a row in the spreadsheet and that will cause
        # updateSpread to be called - updateSpread will call getRowDataFromDF
        # because only one row will be updated
        # you can tell it was called because the data and thus, the
        # spreadsheet will change
      }

[Package iSPlot version 1.0.7 Index]