getChangeDFData {iSPlot}R Documentation

Determine the data needed to update a dataframe

Description

getChangeDFData is called by the function, updateDFBysPlot, when a data set needs to be changed in response to user interaction with a scatterplot. getChangeDFData returns the data that will be needed to update the data set based on the view mode. Updating the data set occurs in the handleMessage method of gUpdateDataMessage.

Usage

getChangeDFData(curPlot, curPoint)

Arguments

curPlot the active plot (of type sPlotView) returned by getActivePlot
curPoint the point returned by identifyPoint

Value

getChangeDFData returns a list depending on the view mode, which may contain the following items.

dfName the dataframe name
Rname the row name
Cname the column name
data the new data that will be put in the data set

Author(s)

Elizabeth Whalen

See Also

updateDFBysPlot, gUpdateDataMessage-class

Examples

  if (interactive())
  {
    createControlWindow()
    # should load data through Open Data or Open File under the File menu
    data(USArrests)
    loadDFData(USArrests,"USArrests")
    # plotting the data should occur through Plot Data under 
    # the Display menu
    createView(type = "plotView", dataName = "USArrests", 
               plotType = "sPlotView", dfRows = 1:nrow(USArrests), 
               dfColumns = 1:2)  
    # should set the view mode using the ViewMode menu
    setHighlightMode()

    # now click on a point on the plot, which will make it highlighted;
    # clicking on the plot returns a button press event, which creates
    # and handles an object of type gUpdateDataMessage  
  }

[Package iSPlot version 1.0.3 Index]