replace_field: Replace field 'journal' with built-in data sets and user...

replace_field_journalR Documentation

Replace field journal with built-in data sets and user provided data sets.

Description

Replace field journal with built-in data sets and user provided data sets.

Replace field author

Usage

replace_field_journal(dt, abbrtable_user)

replace_field_author(
  dt,
  author.connect = c("nothing", "\\\\&", "&", "and")
)

Arguments

dt

is data.table, the object returned by the function read_bib2dt.

abbrtable_user

data.table, the object returned by the function add_abbrtable.

author.connect

is character, what symbols are used to connect multiple authors, 'nothing','\\&', '&', 'and', where 'nothing' stand for do nothing(default).

Value

data.table

data.table

Examples

csvpath <- system.file("extdata", "myabbr.csv", package = "journalabbr", mustWork = TRUE)
abbrtable_user <- add_abbrtable(file = csvpath, header = FALSE, sep = ";")
colnames(abbrtable_user)

file <- system.file("extdata", "testfile_2.bib", package = "journalabbr", mustWork = TRUE)
dt <- read_bib2dt(file)

newdt <- replace_field_journal(dt, abbrtable_user)
newdt1 <- replace_field_author(dt, author.connect = "and")
newdt2 <- replace_field_author(dt, author.connect = "&")


journalabbr documentation built on Aug. 9, 2022, 5:05 p.m.