td.recode: Recode

Description Usage Arguments Details Value Examples

View source: R/td.recode.R

Description

Function to allow change values of a column to new values.

Usage

1
td.recode(tdf, col, oTable, oDatabase = "", codes, other="same")

Arguments

tdf

td data frame.

col

column name.

oTable

output table name.

oDatabase

output database name.

codes

vector of value pairs. Pairs are current value followed by new value. Must be even number of elements in vector.

other

what to do with values not in the codes vector. Valid are ("same", "null"). Values not in codes vector stay same or are null.

Details

Create a new output table in Teradata with the recoded column from this td data frame.

Value

td data frame pointer to the new table created.

Examples

1
2
3
4
## Not run: 
td.recode(tdf,"marital_status","newCustomer",codes=c("1","S","2","M"))

## End(Not run)

nonsleepr/teradataR documentation built on May 23, 2019, 9:32 p.m.