na.action {PivotalR} | R Documentation

## Functions for filtering `NA` values in data

### Description

'na.omit' returns the object with incomplete cases removed.

### Usage

    ## S4 method for signature 'db.obj'
    na.omit(object, vars = NULL, ...)

### Arguments

`object` | A `db.obj` object, which wraps a data table in the connected database (`db.data.frame`), or some operations on a data table (`db.Rquery`).
`vars` | An array of strings, default is `NULL`. The names of the columns that the user wants to filter `NA` values. If it is `NULL`, all rows that contains `NULL` in any column will be filtered out.
`...` | Further arguments, not implemented yet.

### Value

A `db.Rquery` object, which wraps the operation that filters the `NA` values from the columns `vars` in `object`.

### Author(s)

Author: Predictive Analytics Team at Pivotal Inc.

Maintainer: Frank McQuillan, Pivotal Inc. fmcquillan@pivotal.io

### See Also

`madlib.lm`, `madlib.glm` for linear and logistic regressions.

### Examples

    ## Not run:

    ## set up the database connection
    ## Assume that .port is port number and .dbname is the database name
    cid <- db.connect(port = .port, dbname = .dbname, verbose = FALSE)

    delete("abalone", conn.id = cid)
    dat <- as.db.data.frame(abalone, "abalone", conn.id = cid, verbose = FALSE)

    madlib.lm(rings ~ . - sex - id, data = dat, na.action = na.omit)

    db.disconnect(cid, verbose = FALSE)

    ## End(Not run)

[Package PivotalR version 0.1.18.3.1 Index]