R/del.R

Defines functions config.sections.del

Documented in config.sections.del

#' Delete sections in config, just do config[sections] <- NULL
#'
#' @param config a list of config (eg. generated by read.config)
#' @param sections Sections that need to be deleted
#' @return 
#' A list of config
#' @export
#' @examples
#' config.json <- system.file('extdata', 'config.json', package = 'configr')
#' config <- read.config(config.json, file.type = 'json')
#' config <- config.sections.del(config, 'default')
config.sections.del <- function(config, sections) {
  config[sections] <- NULL
  return(config)
}
Miachol/configr documentation built on Dec. 22, 2017, 2:55 a.m.