Description Arguments Examples
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
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 |
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"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.