Description Usage Arguments Details Author(s) See Also Examples
Query data from SQL sources
1 2 3 4 5 |
connection |
a connection handle as returned by 'odbcConnect'. |
table |
an existing table or view in the database specified with ‘connection’. |
namecou |
a character vector of 3-digit ISO country codes read from column ‘cou’. |
namevar |
a character vector of variables read from column ‘var’. |
nameeuc |
a character vector of end-use categories read from column ‘CATEG’. |
dim.ind |
name of column containing the industry dimension, if different from ‘ind’. |
isic |
an integer specifying the ISIC classification of data sources. |
nameind |
a character vector of industries read from column ‘ind’ or from ‘dim.ind’ if specified. |
nameyear |
and integer vector specifying the selected period. |
add.where |
additional statements passed to the ‘WHERE’ condition of the query. |
topn |
extract only top N number of records. |
Helper function to efficiently query data from SQL sources.
OECD STAN
packageData
, RODBC
1 2 3 4 | library(RODBC)
SQL.STAN <- odbcDriverConnect(connection="SERVER=VS-GEN-SQL-3;DRIVER=SQL Server;DATABASE=STAN",
readOnlyOptimize = TRUE)
DATA.STAN <- queryData(connection=SQL.STAN, table="STANPUB", isic=3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.