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

Teradata® Package for R Function Reference

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Package for R
Release Number
17.20
Published
March 2024
Language
English (United States)
Last Update
2024-05-03
dita:id
TeradataR_FxRef_Enterprise_1720
Product Category
Teradata Vantage

QQNorm

Description

Function determines if values in input data columns follow normal distribution or not. It returns the quantiles of the column values and corresponding theoretical quantile values from a normal distribution. If the column values are normally distributed, then the quantiles of column values and normal quantile values appear in a straight line when plotted on a 2D graph.

Usage

  td_qq_norm_sqle (
      data = NULL,
      target.columns = NULL,
      rank.columns = NULL,
      output.columns = NULL,
      accumulate = NULL,
      ...
  )

Arguments

data

Required Argument.
Specifies the input tbl_teradata.
Types: tbl_teradata

target.columns

Required Argument.
Specifies the name(s) of the column(s) in "data" to generate standard normal quantiles.
Types: character OR vector of Strings (character)

rank.columns

Required Argument.
Specifies the name(s) of the column(s) in "data" containing rank values for "target.columns".
Types: character OR vector of Strings (character)

output.columns

Optional Argument.
Specifies the name(s) of the output column(s) to be generated that contain the theoretical
quantiles of the target column(s). If not specified, name(s) will be generated as "<column name in target_columns>_theoretical_quantiles".
Types: character OR vector of Strings (character)

accumulate

Optional Argument.
Specifies the names of input tbl_teradata columns to copy to the output.
Types: character OR vector of Strings (character)

...

Specifies the generic keyword arguments SQLE functions accept.
Below are the generic keyword arguments:

persist:
Optional Argument.
Specifies whether to persist the results of the function in a table or not.
When set to TRUE, results are persisted in a table; otherwise, results are garbage collected at the end of the session.
Default Value: FALSE
Types: logical

volatile:
Optional Argument.
Specifies whether to put the results of the function in a volatile table or not.
When set to TRUE, results are stored in a volatile table, otherwise not.
Default Value: FALSE
Types: logical

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:

  • "<input.data.arg.name>.partition.column" accepts character OR vector of Strings (character) (Strings)

  • "<input.data.arg.name>.hash.column" accepts character OR vector of Strings (character) (Strings)

  • "<input.data.arg.name>.order.column" accepts character OR vector of Strings (character) (Strings)

  • "local.order.<input.data.arg.name>" accepts logical

Note:
These generic arguments are supported by tdplyr if the underlying SQL Engine function supports, else an exception is raised.

Value

Function returns an object of class "td_qq_norm_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):result

Examples

  
    
    # Get the current context/connection.
    con <- td_get_context()$connection
    
    # Load the example data.
    loadExampleData("tdplyr_example", "rank_table")
    
    # Create tbl_teradata object.
    rank_df <- tbl(con, "rank_table")
    
    # Check the list of available analytic functions.
    display_analytic_functions()
    
    # Example 1: Get theoretical quantile values for 'age' and 'fare'.
    obj <- td_qq_norm_sqle(data=rank_df,
                           target.columns=c("age", "fare"),
                           rank.columns=c("rank_age", "rank_fare"))
    
    # Print the result.
    print(obj$result)