# NOT RUN {
<!-- %% @test .port Database port number -->
<!-- %% @test .dbname Database name -->
## 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"
## The user does not need to run data(abalone) to load the data
delete("abalone", conn.id = cid)
x <- as.db.data.frame(abalone, "abalone", key = "id",
distributed.by = "id", conn.id = cid,
verbose = FALSE)
## preview the actual data
lk(x)
## preview the actual data ordered by id
lk(sort(x, FALSE, x$id))
db.disconnect(cid, verbose = FALSE)
# }
Run the code above in your browser using DataLab