make_id: Make a tidy unique identifier in a data frame of articles

Description Usage Arguments Value Examples

View source: R/make_id.R

Description

Select the best id based on a pre-defined hierarchy, and keep only that for the article

Usage

1
make_id(df, identifier = c("doi","pmid","psyid"))

Arguments

df

data frame that has identifiers as separate variables

identifier

a vector of identifiers <chr> in decreasing order by importance

Value

A data frame without individual id columns, and with new identifier and id columns that contain the best available identifier and the id, respectively

Examples

1
2
3
library(dplyr)
merge_sources(workaholism_pubmed, workaholism_psychinfo) %>%
  make_id(c("psyid", "pmid", "doi", "eid", "sid"))

nthun/metamanager documentation built on Aug. 9, 2019, 1:37 p.m.