R/mmstat.getVariableNames.R

Defines functions mmstat.getVariableNames

Documented in mmstat.getVariableNames

#' mmstat.getVariableNames
#'
#' Returns all variable names of data set stored in the internal environment.
#'
#' @param name character or numeric: name or index of data set
#'
#' @return vector of names
#' @export
#'
#' @examples
#' # Delete all stored data sets
#' mmstat.set(datasets=NULL)
#' # Load CAR data set into mmstat
#' mmstat.getDataNames(mmstat.rds("CARS"))
#' # Extract names of all variables
#' mmstat.getVariableNames(1)
mmstat.getVariableNames <- function(name) {
  gettext(mmstat$dataset[[name]]$allvars, "name")
}

Try the HKRbook package in your browser

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

HKRbook documentation built on Oct. 6, 2022, 9:06 a.m.