GithubHelp home page GithubHelp logo

dabr's Introduction

dabr: Database Management with R logo

R build status

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)

dabr's People

Contributors

villegar avatar

Stargazers

Kirill Müller avatar  avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

rnaimehaom

dabr's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.