jst_unify_journal_id: Unify journal IDs

Description Usage Arguments Details Value Examples

View source: R/augmentations.R

Description

This function is a simple wrapper to unify journal ids.

Usage

1
jst_unify_journal_id(meta_data, remove_cols = TRUE)

Arguments

meta_data

Data which was processed via jst_get_article().

remove_cols

Should the original columns be removed after unifying?

Details

Date on journal ids can be found in three columns: journal_pub_id, journal_jcode and journal_doi. From my experience, most of the time the relevant dat ais present in journal_pub_id or journal_jcode, with journal_jcode being to most common identifier. This function takes the value from journal_pub_id, and if it is missing, that from journal_jcode. journal_doi is currently disregarded.

Value

A modified tibble.

A modified tibble.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
article <- jst_get_article(jst_example("article_with_references.xml"))

jst_unify_journal_id(article)


# per default, original columns with data on the journal are removed
library(dplyr)

jst_unify_journal_id(article) %>% 
  select(contains("journal")) %>% 
  names()
  
# you can keep them by setting `remove_cols` to `FALSE`
jst_unify_journal_id(article, remove_cols = FALSE) %>%  
  select(contains("journal")) %>%
  names()

jstor documentation built on Dec. 11, 2021, 9:56 a.m.