jst_unify_journal_id: Unify journal IDs

View source: R/augmentations.R

jst_unify_journal_idR Documentation

Unify journal IDs

Description

This function is a simple wrapper to unify journal ids.

Usage

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

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 Aug. 16, 2023, 5:09 p.m.