refdb_merge: Merge reference databases

View source: R/refdb_merge.R

refdb_mergeR Documentation

Merge reference databases

Description

Merge several reference database by common fields.

Usage

refdb_merge(..., keep = "fields_all")

Arguments

...

reference databases (tibbles).

keep

determines which columns to keep. Can be "fields_all" (default), "fields_shared" or "all" (see Details).

Details

Columns are merged only if they are associated to the same field.

The keep argument determines which columns are returned as follow. "fields_all" (the default) returns all the fields existing in all the reference databases. "fields_shared" returns only the fields shared by all the reference databases. "all" returns all the columns of all the databases. Columns which are not associated to a field are not merged and are prefixed with the name of the object they originated from.

Value

a merged reference database (tibble).

Examples

lib_1 <- read.csv(system.file("extdata", "baetidae_bold.csv", package = "refdb"))
lib_1 <- refdb_set_fields_BOLD(lib_1)
lib_2 <- lib_1
refdb_merge(lib_1, lib_2)


refdb documentation built on Sept. 22, 2022, 5:07 p.m.