is.db.data.frame: Check if an object is of type 'db.data.frame'

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/utilities.R

Description

This function checks if the input is of type db.data.frame.

Usage

1

Arguments

x

The input can be of any type.

Details

is.db.data.frame() returns TRUE if x is of type db.data.frame. Otherwise, it returns FALSE.

Value

A logical. Returns TRUE if the input is of type db.data.frame

Author(s)

Author: Predictive Analytics Team at Pivotal Inc.

Maintainer: Frank McQuillan, Pivotal Inc. [email protected]

See Also

as.db.data.frame Convert an object into another object of type db.data.frame.

Examples

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

## create a table from the example data.frame "abalone"
tmp <- as.db.data.frame(abalone, conn.id = cid, verbose = FALSE)
x <- db.data.frame(content(tmp), conn.id = cid, key = 'id')

## getting the primary key
is.db.data.frame(x) #check if x is of type db.data.frame

db.disconnect(cid, verbose = FALSE)

## End(Not run)

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