dabr: Database Management with R


output: github_document

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

dabr: Database Management with R logo

r badger::badge_cran_release("dabr", "black")
r badger::badge_devel("special-uor/dabr", "yellow")
r badger::badge_github_actions("special-uor/dabr")

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)

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

dabr::close_conn(conn)