Teradata R Package Function Reference - ScaleMap - Teradata R Package - Look here for syntax, methods and examples for the functions included in the Teradata R Package.

Teradata® R Package Function Reference

Product
Teradata R Package
Release Number
16.20
Published
February 2020
Language
English (United States)
Last Update
2020-02-28
dita:id
B700-4007
lifecycle
previous
Product Category
Teradata Vantage

Description

The ScaleMap (td_scale_map_mle) 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).

Usage

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

Arguments

data

Required Argument.
Specifies the input tbl_teradata for scale function.

input.columns

Required Argument.
Specifies the input tbl_teradata columns that contain the attribute values of the samples.

miss.value

Optional Argument.
Specifies how the td_scale_mle, td_scale_map_mle, and td_scale_by_partition_mle functions are to process NULL values in input, 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"

data.sequence.column

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.

Value

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

Examples

    # Get the current context/connection
    con <- td_get_context()$connection
    
    # Load example data about houses.
    loadExampleData("scalemap_example", "scale_housing")
    
    # Create remote tibble objects.
    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"
                                    )