SimpleImputeFit
Description
td_simple_impute_fit_sqle()
function outputs values to substitute for missing
values in the input data. The output values are input to td_simple_impute_transform_sqle()
function, which makes the substitutions.
Usage
td_simple_impute_fit_sqle (
data = NULL,
stats.columns = NULL,
literals.columns = NULL,
partition.column = NULL,
stats = NULL,
literals = NULL,
...
)
Arguments
data |
Required Argument. |
stats.columns |
Optional Argument. |
literals.columns |
Optional Argument. |
partition.column |
Optional Argument. |
stats |
Optional Argument. |
literals |
Optional Argument. |
... |
Specifies the generic keyword arguments SQLE functions accept. volatile: 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:
Note: |
Value
Function returns an object of class "td_simple_impute_fit_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):
output
output.data
Examples
# Get the current context/connection.
con <- td_get_context()$connection
# Load the example data.
loadExampleData("tdplyr_example", "titanic")
# Create tbl_teradata.
titanic <- tbl(con, "titanic")
# Check the list of available analytic functions.
display_analytic_functions()
# Example 1: Create stats for "fare" column and impute value "2"
# in "pclass" column.
fit_obj <- td_simple_impute_fit_sqle(data=titanic,
stats.columns="fare",
literals.columns="pclass",
partition.column="sex",
stats="median",
literals="2")
# Print the result.
print(fit_obj$result)
print(fit_obj$output.data)