Learn R Programming

cffr (version 1.1.1)

cff_parse_person: Previous API: Parse a person to cff

Description

[Deprecated] Please use as_cff_person()

Usage

cff_parse_person(person)

cff_parse_person_bibtex(person)

Value

A person in format cff.

Arguments

person

It can be either:

  • A person or list of person object created with utils::person().

  • A character object or vector representing a person or persons.

See Also

as_cff_person()

Other deprecated functions: cff_extract_to_bibtex(), cff_from_bibtex(), cff_parse_citation(), write_bib()

Examples

Run this code
# Create a person object
a_person <- person(
  given = "First", family = "Author",
  role = c("aut", "cre"),
  email = "first.last@example.com", comment = c(
    ORCID = "0000-0001-8457-4658",
    affiliation = "An affiliation"
  )
)

a_person

cff_person <- as_cff_person(a_person)

cff_person

# Back to person object with S3 Method
as.person(cff_person)

# Parse a string
a_str <- paste0(
  "Julio Iglesias  ",
  "()"
)
as_cff_person(a_str)

# Several persons
persons <- c(person("Clark", "Kent"), person("Lois", "Lane"))

as_cff_person(persons)

# Or you can use BibTeX style if you prefer

x <- "Frank Sinatra and Dean Martin and Davis, Jr., Sammy and Joey Bishop"

as_cff_person(x)

as_cff_person("Herbert von Karajan")

Run the code above in your browser using DataLab