Description Usage Arguments Value See Also Examples
Tests each element if a table or a view exists in one of database schemas. Names could be just table name of schema followed by table name via '.'. ;
1 |
channel |
object as returned by |
tables |
list of table names. Name may contain schema name
followed by dot and table name or may be |
withNames |
logical indicates if table components included in the results. |
allTables |
a data frame containing table-like objects accessible from
Aster. Usually obtained with |
logical vector indicating if corresponding name is table in Aster database.
Special case when name contains a SQL query triggers NA
value instead.
This behavior is handy when checking if a table name corresponds to a table
(or a view) or a SQL query instead. For example, to test if all names are
either existing tables or views or SQL queries use something like this:
result = isTable(...); if(all(result | is.na(result)) ...
1 2 3 4 5 6 7 8 9 | if(interactive()){
# initialize connection to Lahman baseball database in Aster
conn = odbcDriverConnect(connection="driver={Aster ODBC Driver};
server=<dbhost>;port=2406;database=<dbname>;uid=<user>;pwd=<pw>")
isTable(conn, "pitching") # TRUE
isTable(conn, "pitch%") # TRUE
isTable(conn, "public.pitching") # FALSE
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.