R/remove_attr.R

#' Remove 'attr's from object
#'
#' Remove 'attr's from object so that functionality like 'filter' in "dplyr"
#' can be performed.
#'
#' @param obj An R object with different attributes.
#' @param attr_names Vector of character strings indicating names of the attributes
#'        to be removed
#'
#' @return An R object without the specified attr
#' @export
#'
#' @examples basisFICO_1 <- remove(basisFICO_1, 'knots')
remove_attr <- function(obj, attr_name) {
  attr(obj, attr_name) <- NULL
  return(obj)
}
hongqi0314/PRAuto.PMML documentation built on May 6, 2019, 11:30 a.m.