Skip to content

Language: New Statement

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

Creating a new object.

Syntax:

  1. NEW ID PARAMETERS AS ID: Create a new plugin parameters set.

  2. NEW ID DATAFRAME FROM ID plocation: Create a new data frame from either the results (analysis output) or data frame (analysis input) of a plugin parameters set.

where

  • ID is the name of the source or destination object
  • plocation is either 'dataframe' or 'results'

Example (from https://github.com/mauriceling/tapps/blob/master/examples/example_02.py):

# Set relative current working directory and load a CSV file
set rcwd data
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

# Execute plugin using testingA as input
runplugin testingA

# Create a new data frame called STI_summarize from the results of executing plugin using testingA
new STI_summarize dataframe from testingA results

Advanced Topics

  1. Bytecodes generated are:
    • newparam
    • newdataframe