R/package.R

#' hidden: A package for detecting hidden types.
#'
#' This package makes it easy to identify objects or object elements which store a simpler
#' hidden type. "Hidden type" refers to a simpler type or class that we could convert an
#' object to without losing information.
#' Additionally the functions \code{unfactor} and \code{make_logical} allow for the quick
#' conversions that base R doesn't.
#'
#' @section hidden contains the following functions:
#'
#' \describe{
#'   \item{hides_df}{\code{TRUE} if list or environment contains only objects of same length.}
#'   \item{hides_int}{\code{TRUE} if numeric, character or factor could be converted to integer without loss of information.}
#'   \item{hides_lgl}{\code{TRUE} if numeric, character or factor contains binary values that
#'   could be converted to \code{logical} without loss of information other than labels (see also \code{make_logical}).}
#'   \item{hides_mat}{\code{TRUE} if data frame, list or environment contain only objects of same length and same type.}
#'   \item{hides_num}{\code{TRUE} if character or factor could be converted to numeric without loss of information.}
#'   \item{hides_vec}{\code{TRUE} if data.frame list or environment contains only objects of length 1.}
#'   \item{make_logical}{Convert to logical if \code{hides_lgl(x, ...)} is \code{TRUE}.}
#'   \item{unfactor}{Convert a factor or the factors of a data.frame, list or environment to the type they hide (character or numeric)}
#' }
#'
#' @docType package
#' @name hidden
NULL
moodymudskipper/hidden documentation built on May 20, 2019, 9:59 a.m.