MyNixOS website logo
Description

Database Management with R.

Provides functions to manage databases: select, update, insert, and delete records, list tables, backup tables as CSV files, and import CSV files as tables.

dabr: Database Management with R logo

R buildstatus

The goal of dabr is to provide functions to manage databases: select, update, insert, and delete records, list tables, backup tables as CSV files, and import CSV files as tables.

Installation

You can install the released version of dabr from CRAN with:

install.packages("dabr")

And the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("special-uor/dabr", "dev")

Example

Connecting to the Reading Palaeofire Database (RPD), locally installed under the name RPD-latest:

conn <- dabr::open_conn_mysql("RPD-latest", 
                              password = rstudioapi::askForPassword(prompt = "Password"))

Explore the database structure by listing the tables and their attributes:

dabr::list_tables(conn)
#> 
#> 
#> |age_model |
#> |:---------|
#> |ID_MODEL  |
#> |ID_SAMPLE |
#> |mean      |
#> |median    |
#> |UNCERT_5  |
#> |UNCERT_25 |
#> |UNCERT_75 |
#> |UNCERT_95 |
#> 
#> 
#> |chronology       |
#> |:----------------|
#> |ID_MODEL         |
#> |ID_SAMPLE        |
#> |original_est_age |
#> 
#> 
#> |date_info           |
#> |:-------------------|
#> |ID_ENTITY           |
#> |ID_DATE_INFO        |
#> |material_dated      |
#> |date_type           |
#> |avg_depth           |
#> |thickness           |
#> |lab_number          |
#> |age_C14             |
#> |age_calib           |
#> |error               |
#> |correlation_info    |
#> |age_used            |
#> |reason_age_not_used |
#> |notes               |
#> 
#> 
#> |entity               |
#> |:--------------------|
#> |ID_SITE              |
#> |ID_ENTITY            |
#> |entity_name          |
#> |latitude             |
#> |longitude            |
#> |elevation            |
#> |depositional_context |
#> |measurement_method   |
#> |TYPE                 |
#> |source               |
#> |core_location        |
#> |last_updated         |
#> |ID_UNIT              |
#> 
#> 
#> |entity_link_publication |
#> |:-----------------------|
#> |ID_ENTITY               |
#> |ID_PUB                  |
#> 
#> 
#> |model_name |
#> |:----------|
#> |ID_MODEL   |
#> |model_name |
#> 
#> 
#> |publication |
#> |:-----------|
#> |ID_PUB      |
#> |citation    |
#> |pub_DOI_URL |
#> |bibentry    |
#> 
#> 
#> |sample                      |
#> |:---------------------------|
#> |ID_ENTITY                   |
#> |ID_SAMPLE                   |
#> |avg_depth                   |
#> |sample_thickness            |
#> |charcoal_measurement        |
#> |analytical_sample_size      |
#> |analytical_sample_size_unit |
#> 
#> 
#> |site             |
#> |:----------------|
#> |ID_SITE          |
#> |site_name        |
#> |latitude         |
#> |longitude        |
#> |elevation        |
#> |site_type        |
#> |water_depth      |
#> |basin_size_class |
#> |catch_size_class |
#> |flow_type        |
#> |basin_size_km2   |
#> |catch_size_km2   |
#> 
#> 
#> |unit    |
#> |:-------|
#> |ID_UNIT |
#> |UNIT    |

ALWAYS! close your connection to the database (when you are done):

dabr::close_conn(conn)
Metadata

Version

0.0.4

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows