na.action: Functions for filtering 'NA' values in data

Description Usage Arguments Value Author(s) See Also Examples

Description

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

Usage

1
2
## 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. [email protected]

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## 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)

PivotalR documentation built on May 30, 2017, 8:18 a.m.