getChangeDFData {iSPlot}R Documentation

Determine the data needed to update a dataframe


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.


getChangeDFData(curPlot, curPoint)


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


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


Elizabeth Whalen

See Also

updateDFBysPlot, gUpdateDataMessage-class


  if (interactive())
    # should load data through Open Data or Open File under the File menu
    # 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

    # 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]