refdb_merge {refdb} | R 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 |
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)
[Package refdb version 0.1.1 Index]