OWRpy

OWRpy

General Documentation

OWRpy is the base class for all Red-R widgets. All widgets in the Red-R Framework must inherit from this class. OWRpy provides, by default, an importation of many of the standard base classes as indicated in the following...

class OWRpy.OWRpy(wantGUIDialog=0, **kwargs)[source]

Bases: widgetSignals.widgetSignals, redRWidgetGUI.redRWidgetGUI, widgetSession.widgetSession

This is the base class.

The class is a meta class of widgetSignals, redRWidgetGUI, and widgetSession

R(query, callType='getRData', processingNotice=False, silent=False, showException=True, wantType='convert', listOfLists=True)[source]

Connection to the R session for widgets.

This function passes most arguments to RSession as Rcommand. callType is currently depricated. processingNotice sets the widget status to processing. silent indicates that the function call should be run in silent mode, silent calls will not be appended to the log or the history, silent should only be set when checking the value of an R object while assignment should not be slient. Note that if silent is True, exceptions will not be raised should they occur and None will be returned silently. showException indicates if a popup dialog should be shown when an exception occurs.

__init__(wantGUIDialog=0, **kwargs)[source]

Initialization of the class.

This sets the unique widget number as well as the “Don’t save list”, a list of variables that will not be saved for the widget, this significantly reduces the time to load and save a schema.

addToCM(colname='tmepColname', CM=None, values=None)[source]
assignR(name, object)[source]
customWidgetDelete()[source]

Called by onDeleteWidget and can run arbitrary code to handle the deletion of a widget.

Should be reimplemented in child classes if desired.

getReportText2(fileDir)[source]
getReportText3(fileDir)[source]
log(comment, level=0)[source]

Class implemnetation of logging

Passes parameters to the redRLog module.

makeCM(Variable)[source]
onDeleteWidget()[source]

Called when widget is deleted.

This should be called by Red-R Core only.

refresh()[source]

Called by the sendRefresh command.

Should be reimplemented in child classes if desired.

reloadWidget()[source]

Called on widget reload.

Should be reimplemented in child classes if desired.

require_librarys(librarys, repository=None)[source]

Load R libraries using the RSession require_librarys function.

Takes a list of strings as R libraries to load. These should be valid R packages or an error will occur. repository is an optional argument to specity a custom repository if the library is not in a standard location.

resetRvariableNames(id=None)[source]

Sets the self.Rvariables dict with a unique string for each variable desired.

This should be considered a private function to core but there may be the extreme case where it would be useful. One major problem with calling this function after setting a new widgetID (using self.widgetID = float) would be that variables that are already declared would be lost to Red-R and would be a waste of memory.

sendRefresh()[source]

Indicates that all widgets should run their refresh functions.

setRvariableNames(names)[source]

Sets the self.Rvariables dict with a unicode string for each variable, this is called in __init__.

Previous topic

OWReport

Next topic

OrderedDict

This Page

  • Show Source