Documentation

Migrating From RPGM 2

Breaking Changes

  1. When a program is executed, the R working directory is no longer in the users's output folder, but in the program folder.
    • Before: for accessing the program's files, you had to call rpgm.pgmFilePath (example: source(rpgm.pgmFilePath("functions.R")))
    • Now: Just call directly the program's file: source("functions.R") as you would normally do in R
    • Now: To write or copy a file to the user's output folder, use rpgm.outputFolder. For example png(paste0(rpgm.outputFolder, "/plot.png")) or native R function file.copy()
  2. Widgets doublefloat and doublenumeric are removed. This is due to the new layout system. Please replace those widgets by two standards number inputs.
  3. Removed all gui.add<WidgetType> functions like addButton, addSelect
  4. Removed gui.setChoiceValue as it can be confusing.

Non-Breaking Changes

  1. Widgets now longer require an ID. A widget without an ID will not create and/or set a variable in R. This is useful for display-only widgets like labels or images.
  2. Added gui.add(id, type) for adding a new widget.
  3. Added gui.setProperty(step, widgetid, property, value). All widgets properties can be changed dynamically.
  4. Added gui.setProperties(step, widgetid, listOfProperties) for changing multiples properties.
  5. All function like gui.setValue, gui.show, gui.enable are now aliases for gui.setProperty.