An open API service indexing awesome lists of open source software.

https://github.com/special-uor/dabr

dabr: Database Management with R
https://github.com/special-uor/dabr

Last synced: 3 months ago
JSON representation

dabr: Database Management with R

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
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](https://cran.r-project.org/package=dabr) with:

``` r
install.packages("dabr")
```

And the development version from [GitHub](https://github.com/special-uor/dabr) with:

``` r
# 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`:
```{r}
conn <- dabr::open_conn_mysql("RPD-latest",
password = rstudioapi::askForPassword(prompt = "Password"))
```

Explore the database structure by listing the tables and their attributes:
```{r}
dabr::list_tables(conn)
```

__ALWAYS!__ close your connection to the database (when you are done):
```{r}
dabr::close_conn(conn)
```