R/NamesAssign.R

Defines functions `names<-.BibEntry`

#' @param value character vector of new key values to replace into \code{x} 
#' @rdname names.BibEntry
#' @method names<- BibEntry
#' @export
#' @return \code{names<-} the updated BibEntry object.
`names<-.BibEntry` <- function(x, value){
  x <- mapply(`attr<-`, unclass(x), list('key'), as.list(value),
              SIMPLIFY = FALSE) 
  class(x) <- c('BibEntry', 'bibentry')
  x <- MakeKeysUnique(x)
  x
}

Try the RefManageR package in your browser

Any scripts or data that you put into this service are public.

RefManageR documentation built on Oct. 1, 2022, 1:08 a.m.