Package: kwb.db 0.7.0

Hauke Sonnenberg

kwb.db: Functions supporting data base access

This package contains some useful functions, especially for simplifying data transfer between MS Access databases and R. With the functions of this package it is not needed any more to open and close a database connection explicitely; this is done 'behind the scenes' in the functions. Instead of a database connection the path to the database file needs to be passed to the functions as an argument. The main functions are hsGetTable and hsPutTable which transfer data from an MS Access database to a data frame in R and save data from a data frame in R into a table in an MS Access database, respectively. Take care when getting time series data from an MS Access database, see therefore hsMdbTimeSeries. Use hsTables to get a list of tables that are available in a database and hsFields to get a list of table fields that are contained in a database table.

Authors:Hauke Sonnenberg [aut, cre], Michael Rustler [ctb], Kompetenzzentrum Wasser Berlin gGmbH [cph]

kwb.db_0.7.0.tar.gz
kwb.db_0.7.0.zip(r-4.5)kwb.db_0.7.0.zip(r-4.4)kwb.db_0.7.0.zip(r-4.3)
kwb.db_0.7.0.tgz(r-4.4-any)kwb.db_0.7.0.tgz(r-4.3-any)
kwb.db_0.7.0.tar.gz(r-4.5-noble)kwb.db_0.7.0.tar.gz(r-4.4-noble)
kwb.db_0.7.0.tgz(r-4.4-emscripten)kwb.db_0.7.0.tgz(r-4.3-emscripten)
kwb.db.pdf |kwb.db.html
kwb.db/json (API)
NEWS

# Install 'kwb.db' in R:
install.packages('kwb.db', repos = c('https://kwb-r.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/kwb-r/kwb.db/issues

On CRAN:

data-importdatabase-accessdatabase-connectionrodbc

55 exports 3.38 score 6 dependencies 22 dependents 5 scripts

Last updated 12 months agofrom:d4b0d9b2a9. Checks:OK: 3 NOTE: 4. Indexed: yes.

TargetResultDate
Doc / VignettesOKAug 21 2024
R-4.5-winNOTEAug 21 2024
R-4.5-linuxNOTEAug 21 2024
R-4.4-winNOTEAug 21 2024
R-4.4-macNOTEAug 21 2024
R-4.3-winOKAug 21 2024
R-4.3-macOKAug 21 2024

Exports:createRDatabaseInterfacecurrentDbdataFrameToSqlTuplesdumpDatabasegetCurrentSqlDialectgetDatabaseFieldInfogetNamedExcelRangeshsClearTablehsCloseMdbhsDropTablehsFieldshsGetTablehsGetTimeSerieshsLookupOrAddRecordhsMdbTimeSerieshsOpenDbhsPutTablehsSetForeignKeyhsSetPrimaryKeyhsSqlExAndhsSqlExOrhsSqlExTimeCondhsSqlExTimeGrouphsSqlExTsFieldshsSqlQueryhsTablesisExcel2003FileisExcel2007FileisExcelFileisMySQLkeyValuesToSqlkeyValuesToSqlAssignmentkeyValuesToSqlAssignment2keyValueToSqllistValuesToSqllookupRecordmerge_relationsread_relationsread_schematarenamesToFieldListrenamesToQueriesselectFromTablesetCurrentDbsetCurrentSqlDialectsqlForInsertsqlForInsertDataFramesqlForInsertFromSelectsqlForInsertIgnoreInMsAccesssqlForSelectsqlForSelectByKeysqlForUpdatesqlFullLeftJoinsqlJoinExpressionsqlLeftJoinExpressionxmdb

Dependencies:kwb.datetimekwb.utilsodbc32pbdZMQr2rRODBC

Readme and manuals

Help Manual

Help pageTopics
Connection String AccessconnectionStringAccess
Create R-Function Interface to DatabasecreateRDatabaseInterface
Get Path to or Name of Current DatabasecurrentDb
Create SQL Tuples from Data FramedataFrameToSqlTuples
Export Database Tables to CSV FilesdumpDatabase
Get Current SQL DialectgetCurrentSqlDialect
Get Information on Table Field Names and TypesgetDatabaseFieldInfo
Get Database SchemagetDatabaseSchema
Get Filtered RecordsgetFilteredRecords
Get Named Ranges from Excel FilegetNamedExcelRanges
Get SQL Dialect from Given DatabasegetSqlDialect
Get Type IdentifiergetTypeIdentifier
Clear a Database TablehsClearTable
Close Connection to MS Access or ExcelhsCloseDb
Close ConnectionhsCloseMdb
Drop Database Table(s)hsDropTable
Export Database Tables to CSV FileshsDumpMdb
Available Fields in Database TablehsFields
Get Table from MS Access DatabasehsGetTable
Get Time Series With Timestamp InfohsGetTimeSeries
Date to "mm/dd/yyyy HH:MM:SS"hsJetDate
Lookup or Add RecordhsLookupOrAddRecord
Get Mdb time series in UTChsMdbTimeSeries
Open Connection to MS Access or ExcelhsOpenDb
Open Connection to MS Access DatabasehsOpenMdb
Save Data Frame to Database TablehsPutTable
Set Foreign Key for Table FieldhsSetForeignKey
Set Primary Key of Database TablehsSetPrimaryKey
SQL Expression "AND"hsSqlExAnd
SQL Expression "OR"hsSqlExOr
SQL Expression: Time PeriodhsSqlExTimeCond
SQL Expression: Time GroupinghsSqlExTimeGroup
SQL Expression: Timestamp InfohsSqlExTsFields
Send SQL Query to DatabasehsSqlQuery
Available tables in databasehsTables
Available timestamp-field(s) in database tablehsTsField
Is this an XLS file?isExcel2003File
Is this an XLSX file?isExcel2007File
Is this an Excel file?isExcelFile
Is the Given Database of Type MySQL?isMySQL
List of Key = Value Pairs to SQL ExpressionskeyValuesToSql
List of Key = Value Pairs to SQL AssignmentkeyValuesToSqlAssignment
Key Values to SQL Assignment (2)keyValuesToSqlAssignment2
List of Key = Value Pairs to SQL Filter ExpressionkeyValuesToSqlFilter
Generate SQL Filter or Assignment ExpressionkeyValueToSql
Create SQL Tuples from a ListlistValuesToSql
Lookup RecordlookupRecord
Merge Table Schema with Relationship Informationmerge_relations
Open Adequate Connection or StopopenAdequateConnectionOrStop
Print Database SchemaprintDatabaseSchema
R-code for Functions to Access Database Tablesrcode_DatabaseInterface
Read Relations from MSysRelationships Table CSV Exportread_relations
Read Table Schemata from XML Filesread_schemata
Read SQL Commands from FilereadSqlCommandsFromFile
List of Renamings to Field Selection StringrenamesToFieldList
List of Renamings to SQL QueriesrenamesToQueries
Run SQL Commands from FilerunSqlCommandsFromFile
Safe Table NamesafeTableName
Select from DatabaseselectFromDb
Select from TableselectFromTable
Set Current DatabasesetCurrentDb
Set Current SQL DialectsetCurrentSqlDialect
Generate SQL INSERT statementsqlForInsert
Generate SQL INSERT StatementsqlForInsertDataFrame
SQL for INSERT FROM SELECTsqlForInsertFromSelect
SQL for "INSERT IGNORE" in MS AccesssqlForInsertIgnoreInMsAccess
Generate SQL SELECT statement#'sqlForSelect
Generate SQL SELECT StatementsqlForSelectByKey
Generate SQL UPDATE StatementsqlForUpdate
Merge SQL Queries to One Query That Performs a Full Left JoinsqlFullLeftJoin
Create an SQL JOIN ExpressionsqlJoinExpression
Generate SQL for LEFT JOINsqlLeftJoin
Generate (Base Part of) SQL for LEFT JOINsqlLeftJoinBody
Create an SQL LEFT JOIN ExpressionsqlLeftJoinExpression
Path to example databasexmdb