Teradata R Package Function Reference - Antiselect - 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

Antiselect (td_antiselect_mle) returns all columns except those specified in the "exclude" argument.

Usage

  td_antiselect_mle (
      data = NULL,
      exclude = NULL,
      data.sequence.column = NULL
  )

Arguments

data

Required Argument.
Specifies the input tbl_teradata object on which antiselect operation is to be performed.

exclude

Required Argument.
Specifies the names of the columns not to return. Values to this argument can be provided as a vector, if multiple columns are used.
Note: The column names are case-sensitive.

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_antiselect_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.
    loadExampleData("antiselect_example", "antiselect_input")
    
    # Create remote tibble objects.
    antiselect_input <- tbl(con, "antiselect_input")
    
    # Example - Exclude five columns as specified in the "exclude" argument
    td_antiselect_out <- td_antiselect_mle(data = antiselect_input,
                                       exclude = c("rowids","orderdate","discount",
                                                  "province", "custsegment")
                                       )