R/factor_info.R

Defines functions finfo

Documented in finfo

#' View factor information for each variable in data frame
#'
#' Obtain the variable name, class, levels, and ordered status
#'
#' @param df data frame
#' @param i  integer
#'
#' @return list
#' @export
#'
#' @examples
#' finfo(iris, 5)
finfo <- function(df, i){cat("Name:  ", names(df)[[i]],
                             "\nType:  ", class(df[[i]]),
                             "\nLevels:", levels(df[[i]]),
                             "\nOrdered:", is.ordered(df[[i]]))
}
mncube/infact documentation built on Dec. 21, 2021, 8:07 p.m.