get_publications.publication: Update information for a publications object.

get_publications.publicationR Documentation

Update information for a publications object.

Description

This works for records without publicationids. We assume that data with publicationids is correct.

Usage

## S3 method for class 'publication'
get_publications(x, ...)

Arguments

x

integer A publication

...

publicationid The unique numeric identifier associated with a publication in Neotoma. datasetid A unique identifier for a Neotoma dataset that is associated with a publication. familyname The full or partial last name for an individual author. pubtype The publication type, from get_tables("publicationtypes"). year The year the publication was released. search A plain text search string used to search the citation.

Value

updated publication object

Examples


# Take a publication object and purposely degrade the metadata:
bad_pub <- get_publications(666)
# Note this only changes the reported year, not the citation string.
bad_pub[[1]]@year <- "1923"
bad_pub[[1]]@publicationid <- as.character(NA)
updated_pubs <- get_publications(bad_pub[[1]])
attr(updated_pubs, "matches")
# we see the proper citation in the record:
updated_pubs <- attr(updated_pubs, "matches")[[3]]


neotoma2 documentation built on May 29, 2024, 6:21 a.m.