Starting CDT

If R is not open yet, open it by clicking on its icon. To run CDT, load CDT package by entering library(CDT) at the prompt. If you are using RGui, you can load CDT package by using the menu Packages, then click the sub-menu Load package..., and select CDT from the list. You can start CDT by entering the command startCDT().

# Load CDT library
library(CDT)
# Starting CDT
startCDT()

When CDT starts, you are presented with the GUI as shown in the figure.




CDT Main Window

After you select a function from the menu to execute, the GUI is transformed as follows (the numbers 1 through 7 in red-cyan circles are presented below)




Your window decorations (title bar, etc.) may appear different depending on your operating system and window manager.

CDT GUI is divided into seven components:

  1. Menu Bar
  2. Toolbars
  3. Open Files
  4. Input and Command Panels
  5. Map and Table View
  6. Output Message
  7. Status Bar

These seven components of CDT interface are described in more detail in the following sections.

Toolbars

The toolbar provides access to few functions in the File menu, plus additional tools for interacting with the displayed image. Each toolbar item has pop-up help available. Hold your mouse over the item and a short description of the tool’s purpose will be displayed.

  • allows to load data.frame into CDT, it’s the same as the menu File ‣ Open data.frame  .
  • allows to save current displayed image in the right panel as JPEG or PNG, same as the menu File ‣ Save Image As…  .
  • allows to open a data.frame and directly display it on a table without loading into CDT.
  • allows to save a table displayed in the right panel, same as File ‣ Save table  .
  • allows to execute task from different functions listed in the menus. You have to click on it to execute the current task when it is activated.
  • a spinbox allows to specify the actual dimensions (height and width) of the visible image.
  • redraws displayed image after changing the height or width from the spinbox. After any change on the dimensions of the image through the spinbox, this button will be activated and becomes , you have to redraw the plot to get the new dimensions.
  • Close open tabs.
  • Quit CDT.

Open Files

Each file loaded into CDT is listed in this listbox, it will avoid loading the file twice.




You can delete the data by selecting the corresponding filename and then right click on it, on the drop down menu click on Remove data  . You can display the data.frame on a table by selecting Open in table   as well.

Input and Command Panels

CDT has two ways to set parameters when you use the menu: a dialog box and the left command panel.
Each time you start a CDT function through the menu, an dialog box will come up prompting you to enter the inputs and outputs files and directories related to this function, as well as the required parameters so that the function runs correctly. After you filled up all required fields, you have to click on the button on the toolbar to execute.

If the function needs to display table or plot, CDT provides a command panel displayed in the left panel to set all required parameters and to work with the results, such as, display table or plot/map.

Map and Table View

Tables, print of R objects, plot and maps are displayed in this area.

The tables can be a simple display of a data.frame or a table you can edit for further purposes, if it is an output from a function such as quality control and homogeneity tests.

The plot and map displayed in this window will depend on the type of outputs or functions you have chosen to run.

The map view can be panned, shifting the focus of the map display to another region, and it can be zoomed in and out.

Output Message

When loading data or running some functions, you can track and follow messages that appear in this area. You can check if there were an error during the operation or it has been successfully completed.

Status Bar

On the left side of the status bar, you can get a long description of the widget (button, input entry, list box, combo box, …) you are hovering over (not available for all widgets). In addition, when you hold your mouse over the widget, a short description of the widget’s purpose will be displayed. On the right side, as the task progresses towards completion, the progress bar displays the task’s percentage of completion.




When a map and graph are displayed, the right side of the status bar shows the current position of the mouse as a long/lat coordinate, following it while moving across the map view. Next to the coordinate display you will find the name of the polygon (region, district, …) displayed if the map is from an ESRI shapefile.