summaryrefslogtreecommitdiffstats
path: root/r/connect.R (plain)
blob: 3340574b08ae3971853d5bcba5a172a6ab8dace5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# install.packages(c("RJDBC"));

require (RJDBC);
drv <- JDBC ("com.ibm.db2.jcc.DB2Driver");
conn <- dbConnect (drv, "jdbc:db2:exp004");

dbListTables (conn);

dbGetQuery (conn, "SELECT COUNT(*) FROM vis_collect");

d <- dbReadTable (conn, "vis_collect");

summary (d);

hist (d$"N_CITES");

dbDisconnect (conn);
dbUnloadDriver (drv);

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.