Teradata Package for R Function Reference | 17.00 - 17.00 - ScaleMap - Teradata Package for R

Teradata® Package for R Function Reference

Teradata Package for R
Release Number
July 2021
Last Update
August 2022
Content Type
Programming Reference
Publication ID
English (United States)
Last Update


The ScaleMap function is designed for internal use only; its output is not intended for human interpretation. The ScaleMap function calculates and outputs statistical information for a data set at the vworker level. The output of the ScaleMap function is intended to be input to the functions Scale (td_scale_mle, which calculates scaled values for the data set) and ScaleSummary (td_scale_summary_mle, which calculates global statistics for the data set).


  td_scale_map_mle (
    data = NULL,
    input.columns = NULL,
    miss.value = "KEEP",
    data.sequence.column = NULL,
    data.order.column = NULL



Required Argument.
Specifies the input tbl_teradata for scale function.


Optional Argument.
Specifies Order By columns for "data".
Values to this argument can be provided as a vector, if multiple columns are used for ordering. Types: character OR vector of Strings (character)


Required Argument.
Specifies the input tbl_teradata columns that contain the attribute values of the samples. The attribute values must be numeric values between -1e308 and 1e308. If a value is outside this range, the function treats it as infinity.
Types: character OR vector of Strings (character)


Optional Argument.
Specifies how the td_scale_mle, td_scale_map_mle, and td_scale_by_partition_mle functions process NULL values in input. NULL values are processed as follows:

  1. KEEP : Keep NULL values.

  2. OMIT : Ignore any row that has a NULL value.

  3. ZERO : Replace each NULL value with zero.

  4. LOCATION : Replace each NULL value with its location value.

Default Value: "KEEP"
Permitted Values: KEEP, OMIT, ZERO, LOCATION
Types: character


Optional Argument.
Specifies the vector of column(s) that uniquely identifies each row of the input argument "data". The argument is used to ensure deterministic results for functions which produce results that vary from run to run.
Types: character OR vector of Strings (character)


Function returns an object of class "td_scale_map_mle" which is a named list containing object of class "tbl_teradata".
Named list member can be referenced directly with the "$" operator using name: result.


    # Get the current context/connection
    con <- td_get_context()$connection
    # Load example data about houses.
    loadExampleData("scalemap_example", "scale_housing")

    # Create object(s) of class "tbl_teradata".
    scale_housing <- tbl(con, "scale_housing")

    # Example 1 - This example calculates and outputs statistical information.
    td_scale_map_out <- td_scale_map_mle(data = scale_housing,
                                         input.columns = colnames(scale_housing)[2:7],
                                         miss.value = "omit"