Skip to content

Language: Set Statement

Maurice HT Ling edited this page Dec 6, 2015 · 4 revisions

Set options in environment or within plugin parameters set.

Syntax:

  1. SET DISPLAYAST ID: Toggle to display abstract syntax tree (the bytecode tree). By default is set to False.

  2. SET CWD FOLDER: Set current working directory to an absolute directory path as the current working directory.

  3. SET SEPARATOR separators: Set to a different separator (especially used in loading CSV file of a different separator). BY default, it is set to comma.

  4. SET FILLIN fillin_options: Set to a different filling in option/value, should filling in be necessary as every row in a data frame needs to be the same. By default, it is set to None.

  5. SET PARAMETER ID IN ID AS ID: Set a parameter within a plugin parameter(s) set.

  6. SET PARAMETER DATAFRAME IN ID AS ID: Set the input data frame within a plugin parameter(s) set to a specific data frame.

  7. SET RCWD ID: Set current working directory to a path relative to the current working directory. Usually, it should be a sub-directory under the current working directory.

  8. SET OCWD: Set current working directory to original current working directory (where TAPPS is executed from).

Example:

# Assuming that execution startup directory is /Users/mauriceling/tapps

# Set current working directory to /Users/mauriceling/tapps/data
# Option 1: Use absolute CWD setting
set cwd /Users/mauriceling/tapps/data
# Option 2: Use relative CWD setting
set rcwd data

# Reset CWD back to execution startup directory (/Users/mauriceling/tapps)
set ocwd

# Show abstract syntax tree for each command
set displayast true

# Set separator to comma
set separator ,

# Set filling in to 1e-100
set fillin 1e-100

# Load a CSV file as STI
load csv STI_2015.csv as STI

# Create a new parameter set from summarize plugin as testingA
new summarize parameter as testingA

# Populate the attributes of testingA
set parameter analysis_name in testingA as test
set parameter analytical_method in testingA as by_series
set parameter dataframe in testingA as STI

Advanced Topics

  1. Bytecodes generated are:
    • set