Editing an R Extension

Authors can edit an R Extension that have not yet been exported from Expert Analytics.

Authors can edit their own R extensions before they are shared. For this purpose, the author's R extension script is securely encrypted in a designated location on their own file system. This means that the author must edit the extension only in their own workspace. However, when the extension has been exported to the SAP Analytics Extensions Directory, the author can no longer edit that version.. This is true even if the author imports their own .spar file in an attempt to edit it. To change the R Extension after export, an author can update the stored extension on their local drive and re-export the new version. A consumer can import an R Extension and use it in a an analysis chain, but not edit the extension.

Take the following steps to edit an R Extension:

  1. In Expert Analytics, go to the Predict room.
  2. Below the Components List on the right-hand side of the window, click the + icon to reveal the context menu. From the menu, select an extension denoted by the EXT identifier.
  3. Click Edit.
  4. The Edit New R Extension dialog box opens at the General tabbed page. Configure any of the following settings:
    1. Change the Extension Name.
    2. Add an Extension Type. Choose Data Writer (agnostic only) and Data Prepare (HANA and agnostic).
    3. If you chose Algorithms as the Extension Type, select an algorithm Category to which the extension is added. Choose from the following categories: Association, Classification, Clustering, R Extensions, Decision Trees, Neural Networks, Outliers, Regression or Time Series. Note that for the Data Writer and Data Prepare extension types, in Expert Analytics version 2.5 only, the Category field is disabled and the only option is R Extensions.
    4. Optionally, change or add an Extension Description.
    5. Optionally, enable recipients to edit by selecting the checkbox, Make editable when shared.
  5. Click Next.
  6. In the Script tabbed page, edit any of the following options:
    1. Change the R script in the Script Editor.
    2. Change the parameters as necessary, which include Primary Function Name, Input DataFrame, Output DataFrame and Model Variable Name. Declare parameters for the model scoring function in the primary function, except for Input Dataframe and Input Model Variable Name, which you select from drop-down lists
    3. Change the checkboxes as necessary, which include Show the Visualization, Show Summary and Option to save the model.
  7. Click Next.
  8. In the Settings tabbed page, configure any of the output parameters to appear in the configuration panel at a future time when the extension is consumed in a chain. Select from the following options:
    1. In the Output Table Definitions, select one of the following checkboxes: Consider all columns from previous component or Consider none. The component generates one predicted column and your selection will affect the Results Tab. For example, suppose the previous component contains five columns. If you consider all columns from the previous component, the Results tab will display the five previous component columns plus the newly-generated predicted column. In this example, that means six columns. If you consider no columns from the previous component, the results tab will display only the newly generated column.
    1. Choose a Data Type for each output column name.
    2. Enter a New Predicted Column Name for each output column name.
  9. Configure any of the input parameters to appear in the configuration panel at a future time when the extension is consumed in a chain. In Property View Definitions, select from the following options:

    1. Property Display Name: Optionally, enter a property display name for any function a parameter to appear in the configuration window. Use to help users make a more intuitive selection.
    2. Control Type: Enables you to decide how you want users to input this parameter. The input methods include text box, dropdown box, combo box, single column selector and multiple column selector.
    3. Settings icon : Use to set a mandatory field and choose the default input data type from the following list: String, Integer, Double and R-Literal.
  10. Click Finish. The R Extension is updated with your latest changes. The script is encrypted and saved on the local file system. The component list in Expert Analytics is updated with the new R Extension.
  11. The updated Extension appears in the Component List under the appropriate section. For example, if you create Data Writers, it appears in the Data Writers section. Take any or all of the following actions:
    1. Identify the extension in the menu via the EXT identifier.
    2. View the extension description by clicking the R Extension name.
    3. Export to a .spar file for sharing.
    4. Save the file via File Explorer.
    5. Share it via the Portal at this address: http://www.sap.com/bi-partner-extensions.
    6. Edit in the R Extension editor window. Option, available only to the author.
    7. Delete. This option cannot be undone. The associated files are deleted from the system immediately.

You have edited your R Extension.