Description Usage Arguments Value See Also Examples
This function imports data from tables located in external databases. It is a wrapper for functions
odbcConnect
and sqlQuery
from the package RODBC. Three database formats are managed
only on Windows platform : MS Access, MS Excel and Dbase. Note that The 2007 versions *.xlsx and *.accdb
work with the drivers which are installed with Microsoft Office 2007. Dbase file name can only have a maximum
length of 8 characters.
1 2 |
tab |
A character chain giving the name of the table in the external database. |
db |
A character chain giving the name of the external data base. If left empty, file.choose is called resulting in a pop-up window allowing to choose the desired file with the mouse. |
query |
A character chain giving any valid SQL statement. The default ("all") results in the selection of all the
records in the target table. It is equivalent to |
as.Date |
Logical (default = FALSE). If TRUE, all variables of classes |
A data frame.
odbcConnect
, sqlQuery
, file.choose
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
tmp <- import()
tmp
tmp <- import(tab = "Tab1", db = "D:/Users/Data/tmp.accdb")
tmp
tmp <- import(tab = "Tab1", db = "D:/Users/Data/tmp.mdb")
tmp
tmp <- import(tab = "Sheet1", db = "D:/Users/Data/tmp.xlsx")
tmp
tmp <- import(tab = "Sheet1", db = "D:/Users/Data/tmp.xls")
tmp
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.