Update metadata for a set of publication objects.
# S3 method for publications
get_publications(x, ...)
publications
object
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.
# \donttest{
# Take a publication object and purposely degrade the metadata:
bad_pub <- get_publications(c(666, 667, 668))
# 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)
# Only the first publication object has any matches. It's the only one
# that is missing its publicaitonid.
attr(updated_pubs[[1]], "matches")
attr(updated_pubs[[2]], "matches")
# we see the proper citation in the record:
updated_pubs[[1]] <- attr(updated_pubs[[1]], "matches")[[1]]
# }
Run the code above in your browser using DataLab