getChangeDFData {iSPlot} | R Documentation |
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
updateDFBysPlot
,
gUpdateDataMessage-class
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 }