dataDB-methods: Wrapper class to a database object

Description Arguments Examples

Description

Wrapper class to a database object

Method for dataDB object: retrieve first n rows from the data set

Method for dataDB object: show names of table

Method for dataDB object: retrieve dimensions of table

Arguments

co

of class MySQLConnection, connection to a MySQL database

table

character string of table name

x

dataDB object

n

number of rows shown

x

dataDB object

x

dataDB object

Examples

1
2
3
4
5
6
7
8
9
connect <- dbConnect(dbDriver("MySQL"), user="2009Expo",
password="R R0cks", port=3306, dbname="data_expo_2009",
host="headnode.stat.iastate.edu")

ontime <- new("dataDB", co=connect, table="ontime")
dim(ontime)
dim(new("dataDB", co=connect, table="weather"))
pitch <- new("dataDB", co=connect, table="Pitching")
d1 <- dbData(pitch, vars=c( "G", "SO"))

heike/dbData documentation built on May 17, 2019, 3:23 p.m.