R/backup_dic.R

Defines functions get_dic backup_dic

Documented in backup_dic get_dic

#' Backup dictionary information
#'
#' @param data A data frame containing dic infromation.
#'
#' @return A list with dic information. This can later be writen back to a data frame with the deploy_dic() function.
#' @export

backup_dic <- function(data) {
  id <- .get_dic_items(data)
  out <- lapply(data[, id], function(x) attr(x, .opt$dic))
  out
}

#' @rdname backup_dic
#' @export
get_dic <- function(data) {
  message("get_dic() is deprecated. Please use backup_dic() instead.")
  backup_dic(data)
}
jazznbass/scaledic documentation built on Sept. 20, 2021, 7:43 p.m.