Software Architecture of Java based RGG GUI Engine. The GUI has four main parts: GUI elements, RGGModel, RGGPanelModel, and RGGPanelBuilder. The engine creates GUI elements for each XML tag. These GUI elements are added to the RGGModel from which the new R script is then generated. The RGGPanelModel is created from the RGGModel. RGGPanelBuilder generates the GUI using RGGPanelModel. The GUI element has three subparts: RElement, VisualComponent, and RElementFactory. RElementFactory initializes the RElement and its visual parts, the VisualComponent. VisualComponent draws the GUI elements on the screen and RElement converts the user inputs into the corresponding R code.