RowNormalizeFit
Description
td_row_normalize_fit_sqle()
function outputs a tbl_teradata containing parameters and specified input columns
to input to td_row_normalize_transform_sqle()
function, which normalizes the input columns row-wise.
Usage
td_row_normalize_fit_sqle (
data = NULL,
target.columns = NULL,
approach = "UNITVECTOR",
base.column = NULL,
base.value = NULL,
...
)
Arguments
data |
Required Argument. |
target.columns |
Required Argument. |
approach |
Optional Argument.
In the normalizing formulas: |
base.column |
Required when "approach" is set to 'INDEX', ignored otherwise. |
base.value |
Required when "approach" is set to 'INDEX', ignored otherwise. |
... |
Specifies the generic keyword arguments SQLE functions accept. volatile: Function allows the user to partition, hash, order or local order the input data. These generic arguments are available for each argument that accepts tbl_teradata as input and can be accessed as:
Note: |
Value
Function returns an object of class "td_row_normalize_fit_sqle"
which is a named list containing object of class "tbl_teradata".
Named list member(s) can be referenced directly with the "$" operator
using the name(s):
output.data
result
Examples
# Notes:\cr
# 1. Get the connection to Vantage to execute the function.\cr
# 2. One must import the required functions mentioned in
# the example from tdplyr.\cr
# 3. Function will raise error if not supported on the Vantage
# user is connected to.\cr
# Load the example data.
loadExampleData("tdplyr_example", "numerics")
# Create tbl_teradata object.
numerics = tbl(con, "numerics")
# Check the list of available analytic functions.
display_analytic_functions()
# Example 1: Create fit object to normalize "smallint_col" and "integer_col"
# columns using "INDEX" approach, "integer_col" as base column
# and base value as 100.0.
fit_obj = td_row_normalize_fit_sqle(data=numerics,
target.columns=c("integer_col", "smallint_col"),
approach="INDEX",
base.column="integer_col",
base.value=100.0)
# Print the result.\cr
print(fit_obj$result)
print(fit_obj$output.data)